Skip to content

Instantly share code, notes, and snippets.

@maxrice
Created January 31, 2018 22:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxrice/293184002038673bd5f367feca144fe0 to your computer and use it in GitHub Desktop.
Save maxrice/293184002038673bd5f367feca144fe0 to your computer and use it in GitHub Desktop.
Jilt for WooCommerce - force individual use for coupons created by Jilt
<?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