Merge pull request #29151 from woocommerce/hide_coupon_on_incomplete_checkout
Prevent displaying coupon form on checkout requiring login
This commit is contained in:
commit
d8735d7225
|
@ -2298,6 +2298,7 @@ if ( ! function_exists( 'woocommerce_checkout_coupon_form' ) ) {
|
|||
* Output the Coupon form for the checkout.
|
||||
*/
|
||||
function woocommerce_checkout_coupon_form() {
|
||||
if ( is_user_logged_in() || WC()->checkout()->is_registration_enabled() || ! WC()->checkout()->is_registration_required() ) {
|
||||
wc_get_template(
|
||||
'checkout/form-coupon.php',
|
||||
array(
|
||||
|
@ -2305,6 +2306,7 @@ if ( ! function_exists( 'woocommerce_checkout_coupon_form' ) ) {
|
|||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'woocommerce_products_will_display' ) ) {
|
||||
|
|
Loading…
Reference in New Issue