woocommerce_before_<object_type>_object_save

The WooCommerce woocommerce before object type save hook.

Description

do_action( 'woocommerce_before_<object_type>_object_save', (unknown) $instance, (unknown) $this_data_store ); 

Parameters (2)

0. $instance (unknown)
The instance.
1. $this_data_store (unknown)
The this data store.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'woocommerce_before_{$object_type}_object_save', $instance, $this_data_store ); 
The following example is for adding a hook callback.
  1. // define the woocommerce_before_<object_type>_object_save callback 
  2. function action_woocommerce_before_object_type_object_save( $instance, $this_data_store ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( "woocommerce_before_{$object_type}_object_save", 'action_woocommerce_before_object_type_object_save', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( "woocommerce_before_{$object_type}_object_save", 'action_woocommerce_before_object_type_object_save', 10, 2 ); 

Defined (7)

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

/includes/class-wc-shipping-zone.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store ); 
/includes/class-wc-product-variable.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store ); 
/includes/class-wc-order.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store ); 
/includes/class-wc-customer-download.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store ); 
/includes/abstracts/abstract-wc-product.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store ); 
/includes/abstracts/abstract-wc-order.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store ); 
/includes/abstracts/abstract-wc-data.php  
  1. do_action( 'woocommerce_before_' . $this->object_type . '_object_save', $this, $this->data_store );