Created
January 31, 2024 14:33
-
-
Save xlplugins/47193f40d26ddffefe5eceef1d0e71ff to your computer and use it in GitHub Desktop.
Enable Coupon for Funnelkit cart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FKWC_Enable_Coupon { | |
public function __construct() { | |
add_filter( 'woocommerce_coupons_enabled', [ $this, 'enable_coupon' ], 99 ); | |
} | |
public function enable_coupon( $status ) { | |
if ( ! class_exists( '\FKCart\Plugin' ) ) { | |
return $status; | |
} | |
return true; | |
} | |
} | |
new FKWC_Enable_Coupon(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment