Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › How’s the plugin verify First Time Purchase? › Reply To: How’s the plugin verify First Time Purchase?

#18855
Soft79
Keymaster

I see. Once an order has been placed by a customer that has logged in, this is stored in the session data. Cancelling the order doesn’t remove this information. This snippet is a workaround (stored as ‘AAA Fix first purchase’ in your staging environment):


add_action( 'init', function() {
  if ( function_exists( 'WJECF' ) ) {
    WJECF()->set_session( 'has_purchased_before', false );
  }
} );

In the next release we will apply a more permanent fix for this.