• Resolved t.schwarz

    (@tschwarz-1)


    Hi,

    I’ve tried to remove the smart buttons on the checkout page using the method described in your github docs – https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Actions-and-Filters#disable-checkout-smart-buttons

    //Enable "Place order" button for PayPal gateway add_filter('woocommerce_paypal_payments_use_place_order_button', '__return_true'); //Change the button label - defaults to "Proceed to PayPal" 
    
    add_filter('woocommerce_paypal_payments_place_order_button_text', function() { return __( 'Place order', 'woocommerce' ); });

    I placed the code in functions.php, to no avail. Smart Buttons are still shown in checkout.

    Is there something that needs to be done in addition to adding these filters that I missed in the documentation?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @

    Thank you for reaching out to us, we are here to help.

    I have tested the code myself and for me it worked out. However, I did not add this in my functions.php file, but added it by using the Snippet plugin.

    Could you to try applying the filter via this plugin as well and let me know if that worked better for you?

    Kind regards,
    Joost

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    The code snippet in the linked wiki works correctly. But when coping it, you seemingly messed up the line breaks, resulting in the first (and most important) snippet not executing since it was commented out.

    To disable the smart buttons on the Checkout page and instead only provide a regular WooCommerce button, only this snippet is needed:

    add_filter('woocommerce_paypal_payments_use_place_order_button', '__return_true'); 

    Kind regards,
    Niklas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable Checkout Smart Button Filter’ is closed to new replies.