• Resolved seanbeee

    (@seanbeee)


    Hi Again.

    Using WooCommerce Conditional Payments, I have been able to restrict Payments to the limited postcodes we are able to ship to. However the Place order button still appears.

    eg, if you order anything, and say choose to have the item shipped to an address in New South Wales, there is no no payment option but you can still place the order. How do I remove the place order button and/or change the text appearing to “We are unable to take your order at this time”

    Thanks in advance for any help offered.

    SeanB

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mina

    (@purpleberryservices)

    Hi,

    You need to make changes in template file for this.

    templates\checkout\form-pay.php

    Replace

    echo apply_filters( ‘woocommerce_pay_order_button_html’, ‘<button type=”submit” class=”button alt” id=”place_order” value=”‘ . esc_attr( $order_button_text ) . ‘” data-value=”‘ . esc_attr( $order_button_text ) . ‘”>’ . esc_html( $order_button_text ) . ‘</button>’ );

    with:

    <?php
    // Check is payment gateway available.
    if ( ! empty( $available_gateways ) ) {
    echo apply_filters( ‘woocommerce_pay_order_button_html’, ‘<button type=”submit” class=”button alt” id=”place_order” value=”‘ . esc_attr( $order_button_text ) . ‘” data-value=”‘ . esc_attr( $order_button_text ) . ‘”>’ . esc_html( $order_button_text ) . ‘</button>’ );
    }
    ?>

    Check how to override templates in child theme
    https://docs.woocommerce.com/document/template-structure/

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Following up on this, if you’re using our Conditional Shipping and Payments or our Conditional Payments plugins, you have access to our support team at WooCommerce.com and we’ll be happy to help.

    If that’s the case, please contact us at WooCommerce.com > My Account > Tickets. Please include a link to this forum thread, so that we can keep track of what’s already been done.

    Thanks!

    Plugin Support Tseten a11n

    (@tibetanitech)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing “Place Order” button when no payment options are available’ is closed to new replies.