• Resolved alphaexcapital

    (@alphaexcapital)


    Hello,

    I only want to use the PayPal buttons provided by the plugin – how do I stop the original payments “buy now” / “order now” button from loading completely?

    I have display:none coded but it loads first then hides, which is annoying.

    Any ideas?

    Thanks.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Tseten a11n

    (@tibetanitech)

    Hi @alphaexcapital

    Just to make sure I’m understanding your question correctly, do you only want to keep these PayPal buttons?

    https://d.pr/i/buQT70
    Link to image: https://d.pr/i/buQT70

    Can you send us the screenshot of how your checkout page looks without the custom CSS to hide the buy now or order now button? Do you have any other payment methods available on your site other than PayPal Checkout?

    Thanks!

    Thread Starter alphaexcapital

    (@alphaexcapital)

    Hello,

    1 – No I dont have any other payment providers activated, just PayPal Checkout.

    2 – Yes I want to keep the buttons.

    Here is the output:

    https://pasteboard.co/KeiUNtk.png

    3 – I have hidden “wc_payment_methods payment_methods methods”, which is fine.

    But it flash loads this class “woocommerce_checkout_place_order”, as I want it hidden/disabled.

    Below is the full class.

    <button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="Buy Now" data-value="Buy Now" style="">Buy Now</button>

    Is it just a hook I can remove?

    melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    HI there!

    Can you please send us a screenshot showing the buttons that you hid, just so we are on the same page.

    Also, Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Thread Starter alphaexcapital

    (@alphaexcapital)

    Hi there, it is here:

    https://pasteboard.co/KemUbqv.png

    This should be a feature to unset from the checkout, right?

    melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    Also, Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.

    Thread Starter alphaexcapital

    (@alphaexcapital)

    Hello,

    Please find the details here:

    https://www.transfernow.net/dl/20210804t59Zqrho

    melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    Hi there!

    The button you are referring to is the PayPal Credit button, which you can disable per https://docs.woocommerce.com/document/paypal-express-checkout/#section-8

    We also encourage you to update to our new PayPal Payments, as mentioned at the top of https://docs.woocommerce.com/document/paypal-express-checkout/

    Hope this helps!

    Thread Starter alphaexcapital

    (@alphaexcapital)

    Hello,

    I’m afraid it’s not as it is disabled in the settings as we are not set up for that with PayPal yet.

    Please look at the big green button. That is the problem I am having with, not the PayPal plugin.

    Please look at this image:

    https://pasteboard.co/KemUbqv.png

    I do not want to load the big green button at all, hence asking about unsetting it.

    I have display:none through CSS that works BUT it loads first then hides, which looks unclean.

    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    It seems this is the default WooCommerce button, although as PayPal Checkout is selected, this button shouldn’t show by default. I did a test on my site but couldn’t replicate what you see: https://d.pr/i/Jk9rjM

    Can you try a conflict test with only WooCommerce and PayPal checkout enabled to see if the button is still visible? Here’s the instruction: https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    Thread Starter alphaexcapital

    (@alphaexcapital)

    Hello, with both plugins only activated it didnt have an impact.

    Here are two videos showing the exact same with and without plugins.

    https://www.transfernow.net/dl/20210806sp22m9Ac

    As you can see, they both do the same flicker before the css kicks in to display:none it.

    Plugin Support nicw.a11n

    (@nicw)

    Hi @alphaexcapital

    The filter for the order button HTML can be found at woocommerce_order_button_html

    Removing the button comletely can be done as follows:

    add_filter('woocommerce_order_button_html', 'remove_order_button_html' );
    function remove_order_button_html( $button ) {
       
        //we remove the button
        $button = '';
    
        return $button;
    }

    Alternatively, you can add conditions, making the button available for specific products. The above snippet can be added using a plugin such as Code Snippets, or in the functions.php file of your child theme.

    Thread Starter alphaexcapital

    (@alphaexcapital)

    Perfect, works a treat! Thanks a lot!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to stop Buy Now from appearing’ is closed to new replies.