Forum Replies Created

Viewing 1 replies (of 1 total)
  • Take a look at the “check_customer_coupons” function that already exists in this version of Woocommerce. You can add a new hook in the class-wc-cart.php init() function to catch this similar scenario, for example:

    add_action('woocommerce_after_checkout_validation', array( $this, 'sfp_check_customer_coupon_usage' ), 1 );

    In the method you create for this task, you’ll want to check the wp_postmeta table for coupon usage based on coupon name and the billing email (meta keys _billing_email and coupons) based on a shared post_id.

Viewing 1 replies (of 1 total)