• Resolved worldless

    (@worldless)


    Hi,
    I’m trying to disable or hide the “Place Order” button for the Check Payments gateway because it’s an offline payment and can be a little bit spammy.

    Now the problem is I can’t hide the button using CSS because all other gateways use the same button and the same class:

    <button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="Place order" data-value="Place order">Place order</button>

    unfortunately the button is not even part of the parent div to apply something like:
    .woocommerce-checkout-payment .button{none}

    I searched through the entire net for a solution but I failed. Is it possible to disable/hide the button through, I dunno, code snippet or something ?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support wpnomad a11n

    (@wpnomad)

    Hi @worldless ,

    You can disable the “Check Payment” option from payment setting page located at WP Admin → WooCommerce → Settings → Payments

    Once it is disabled, the “Check Payment” option won’t show to the users. I hope this helps!

    Thread Starter worldless

    (@worldless)

    Thanks wpnomad
    Like I said I’d like to disable or hide the BUTTON, only for “Check Payments” not to completely disable the gateway!!

    I still want to use the gateway but without letting users place an order.

    Plugin Support mouli a11n

    (@mouli)

    Hi @worldless
    Please can you elaborate a bot more on how you want this to work for the customer/
    I’m not sure how customers can use the gateway but not checkout and how that help your store.
    If we understood better we can hopefully provide a solution.

    We look forward to hearing back from you.

    Thread Starter worldless

    (@worldless)

    Hi mouli and thank you for the follow-up
    Well suppose that you’re selling only digital stuffs for guest customers and you’d like to add a gateway for offline payments. the problem is, if you allowed customers to place an order, you’d receive tons of spam orders because most of them would push the order button out of curiosity.

    I’d like to show any information regarding my bank accounts right in the information box and after the customer made the payment (through the given info), they would send me the transaction ID and the name of the product via email.

    So basically it’s not really necessary to let them place an order and unfortunately the order button is not part of the parent div so that I could hide it ONLY for “Check Payments” using a simple css code like this:

    .woocommerce-checkout-payment .button{display:none}

    also the class for this button is the same for all gateways, if I hide it, say with #place_order{display:none}, it’ll hide the button for all gateways.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @worldless. Sorry we missed your last response.

    You’re right that you can’t use CSS in this case; you will need to use PHP instead. I found a discussion on Stackoverflow that might help.

    I can also recommend the following places for more development-oriented questions:

    – WooCommerce Slack Community: https://woocommerce.com/community-slack/
    – WooCommerce FB group: https://www.facebook.com/groups/advanced.woocommerce/

    Thread Starter worldless

    (@worldless)

    Hi drwpcom and thank you for coming back to me

    It’s working fine but I wish you could add such an option in the future because php codes may not function in the new releases

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @worldless. You may add this as a suggestion to our [Ideas Board](https://ideas.woocommerce.com/forums/133476-woocommerce). Our developers use that board to gauge community traction on what features to include in future versions.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to Disable/Hide “Check Payments” Button’ is closed to new replies.