Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created January 31, 2024 14:33
Show Gist options
  • Save xlplugins/47193f40d26ddffefe5eceef1d0e71ff to your computer and use it in GitHub Desktop.
Save xlplugins/47193f40d26ddffefe5eceef1d0e71ff to your computer and use it in GitHub Desktop.
Enable Coupon for Funnelkit cart
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