Prevent displaying coupon form on checkout requiring login
This commit is contained in:
parent
32b502dcd2
commit
264bccf505
|
@ -2292,12 +2292,14 @@ if ( ! function_exists( 'woocommerce_checkout_coupon_form' ) ) {
|
|||
* Output the Coupon form for the checkout.
|
||||
*/
|
||||
function woocommerce_checkout_coupon_form() {
|
||||
wc_get_template(
|
||||
'checkout/form-coupon.php',
|
||||
array(
|
||||
'checkout' => WC()->checkout(),
|
||||
)
|
||||
);
|
||||
if ( is_user_logged_in() || WC()->checkout()->is_registration_enabled() || ! WC()->checkout()->is_registration_required() ) {
|
||||
wc_get_template(
|
||||
'checkout/form-coupon.php',
|
||||
array(
|
||||
'checkout' => WC()->checkout(),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue