Created
January 31, 2018 22:22
-
-
Save maxrice/293184002038673bd5f367feca144fe0 to your computer and use it in GitHub Desktop.
Jilt for WooCommerce - force individual use for coupons created by Jilt
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
<?php | |
add_filter( 'woocommerce_coupon_get_individual_use', function( $individual_use, $coupon ) { | |
if ( $coupon->meta_exists( 'jilt_discount_id' ) ) { | |
$individual_use = true; | |
} | |
return $individual_use; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment