• Resolved esd3104

    (@esd3104)


    Something weird I have just noticed. It seems that when GoDaddy Payments is selected as the payment method, it somehow overrides the customized text on the the WC “Place Order” button.

    I had seen this with my earlier situation where I was setting the payment gateways available based on the billing country. So I today removed that code and simply had GoDaddy Payments enabled. No matter whether I used the add_filter( ‘woocommerce_order_button_text’ approach or add_filter( ‘woocommerce_order_button_html’ approach whenever the GDP payment option is selected the “Place Order” button is changed to the default “Place Order” text. It overrides the filter I have set. When selecting a different payment option, the Place Order button uses the “Make Payment” wording that I’m trying to get with using a filter.

    What is it with the GDP option that causes the Place Order filters to be overridden?

    add_filter( 'woocommerce_order_button_html', 'ybc_custom_place_order_button_html' );
    
    function ybc_custom_place_order_button_html( $button_html ) {
    	$button_html = str_replace( 'Place order', 'Make Payment', $button_html );
    	return $button_html;
    }

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support jessicaskyverge

    (@jessicaskyverge)

    Hey @esd3104 ,

    Thank you for reaching out about GoDaddy Payments. I’m happy to help!

    One of our team members has created a custom code snippet that should modify the text you’re trying to work with However, please be aware of a couple of notes:

    – I’m afraid that customizations such as this are not covered under our support policy, so implementing this or modifying it isn’t something we can assist with.
    – If you use custom snippets, please be sure you know how to add custom code to your site.

    Here is the code snippet:
    function sv_custom_button_text_place_order( $button_text ) {
    return ‘Make Payment’; // new text goes here
    }
    add_filter( ‘woocommerce_order_button_text’, ‘sv_custom_button_text_place_order’ );

    Could you give this a try and let me know how it goes?

    Thank you,
    Jessica


    Thread Starter esd3104

    (@esd3104)

    Thanks – I have implemented that but it makes no difference. When GDP is the payment option you are somehow overriding even this third way of setting the “place order” button text. I tried making GDP the only gateway and still no difference. I have left it setup with 2 gateways. When another gateway is selected, it says “Make Payment”. When you select GDP as the payment method it says “Place Order”.

    Like I said this is the same even with GDP as the only gateway. If you change back and forth between the payment method you see the text change back and forth. Something about your code overrides any attempt to change the default “Place Order” text for the WC button.

    Plugin Support jessicaskyverge

    (@jessicaskyverge)

    Hey @esd3104 ,
    Thank you for letting me know that didn’t work as expected. My colleague created the snippet and found it only works once the Say What plugin is enabled using the following settings: https://cloud.skyver.ge/p9uernel

    Here is what it will look like once implemented: https://cloud.skyver.ge/geuEo88j Could you give this and try and let me know how it goes?

    Thank you,
    Jessica

    Thread Starter esd3104

    (@esd3104)

    OK – that seems to work. Thanks.

    You folks obviously know your way around WC as I have used your most helpful Sequential Order Numbers for WooCommerce plugin for quite some time. I’m just confused why this payment plugin seems to break/not play nicely with the usual tools WC provides to customize things and needs a code snippet and another plugin to make this work. I have some other customizations with code snippets so the risk of any updates to GDP breaking something seems high.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GDP Overrides Customized “Place Order” Button Text’ is closed to new replies.