woocommerce_coupon_options_usage_restriction

The WooCommerce woocommerce coupon options usage restriction hook.

Description

do_action( 'woocommerce_coupon_options_usage_restriction', (unknown) $coupon_get_id, (unknown) $coupon ); 

Parameters (2)

0. $coupon_get_id (unknown)
The coupon get id.
1. $coupon (unknown)
The coupon.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'woocommerce_coupon_options_usage_restriction', $coupon_get_id, $coupon ); 
The following example is for adding a hook callback.
  1. // define the woocommerce_coupon_options_usage_restriction callback 
  2. function action_woocommerce_coupon_options_usage_restriction( $coupon_get_id, $coupon ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'woocommerce_coupon_options_usage_restriction', 'action_woocommerce_coupon_options_usage_restriction', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'woocommerce_coupon_options_usage_restriction', 'action_woocommerce_coupon_options_usage_restriction', 10, 2 ); 

Defined (1)

The action is defined in the following location(s).

/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php  
  1. do_action( 'woocommerce_coupon_options_usage_restriction', $coupon->get_id(), $coupon );