• Resolved mvas

    (@mvas)


    Hi there,

    How can I change the button text from “Proceed To PayPal” to “Proceed To Payment”?

    Thanks in advance for your kind help with this.

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @mvas,

    Please use the below code snippet to update the button text. You may please copy the snippet in the active theme’s functions.php file.

    add_filter( ‘gettext’, ‘wt_custom_coupon_text’, 20, 3 );
    function wt_custom_coupon_text( $translated_text, $text, $domain ) {
     switch ( $translated_text ) {
      case ‘Proceed To PayPal’ :
          $translated_text = __( ‘Proceed To Payment’, ‘woocommerce’ );
          break;
     }
     return $translated_text;
    }

    Hi,
    Sorry to jump in on this thread but I tried this and it crashed the site.
    Please check.
    I tried the following but it did not do anything.

    add_filter( 'gettext', 'ld_custom_paypal_button_text', 20, 3 );
    function ld_custom_paypal_button_text( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'Proceed to PayPal' :
    			$translated_text = __( 'Your new Paypal button text here', 'woocommerce' );
    			break;
    	}
    	return $translated_text;
    }
    • This reply was modified 2 years, 6 months ago by trapbarn.
    Plugin Author WebToffee

    (@webtoffee)

    Hi @trapbarn,

    Sorry for any inconveneinces caused. `Please use the below code snippet to change the button text. You may please copy the snippet to the active theme’s fucntions.php file and change the text “Proceed To Payment” in the snippet to your desired text.

    add_filter( 'gettext', 'eh_button_change', 20, 3 );
    function eh_button_change( $translated_text, $text, $domain ) {
    	if( $translated_text == 'Proceed to PayPal' ) {
    		$translated_text = __('Proceed To Payment', 'express-checkout-paypal-payment-gateway-for-woocommerce'); // new button text is here
    	}
    	return $translated_text;
    }

    Do let us know how it goes.`

    Hi,
    Thanks, I inserted that but it did not change the button text and when I clicked on the button it gave the PP login complete with email address already populated and no option for Bank Card
    https://staging.trapbarn.com/wp-content/uploads/2021/10/pp7.jpg

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Button Text Change’ is closed to new replies.