mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
9 lines
298 B
Text
9 lines
298 B
Text
add_filter( 'woocommerce_coupons_enabled', 'woocommerce_coupons_enabled_checkout' );
|
|
|
|
function woocommerce_coupons_enabled_checkout( $coupons_enabled ) {
|
|
global $woocommerce;
|
|
if ( ! empty( $woocommerce->cart->applied_coupons ) ) {
|
|
return false;
|
|
}
|
|
return $coupons_enabled;
|
|
}
|