How to edit the text ‘Payment is required. Please pay by credit card.’?

[ad_1]

Unfortunately, in the current version of the plugin, there is no editor field for the Stripe response in the Messages tab. It might be added in a future version.

For the meantime, possible options are 1) to replace the wpcf7_before_send_mail action callback function from wpcf7_stripe_before_send_mail, or 2) to use the wpcf7_submission_result filter hook to change the $result['message'] value when $result['status'] is payment_required.

Thank you, Takayuki!

I have written the following codes to edit the message at the moment. Perhaps other users can use it before you release the ability to change it in the settings.

// change the message display when using stripe
function web_stripe_wpcf7_submission_result( $result){ 
   
   if($result['status'] == 'payment_required' ) $result['message'] = 'Please enter your credit/debit card details above to complete payment.';
      
    return $result;
} 

//add the action 
add_filter('wpcf7_submission_result', 'web_stripe_wpcf7_submission_result', 10, 2);

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer