woocommerce_after_(object_type)_object_save action-hookWC 1.0

Trigger action after saving to the DB.

Usage

add_action( 'woocommerce_after_(object_type)_object_save', 'wp_kama_woocommerce_after_object_type_save_action', 10, 2 );

/**
 * Function for `woocommerce_after_(object_type)_object_save` action-hook.
 * 
 * @param WC_Data          $that       The object being saved.
 * @param WC_Data_Store_WP $data_store THe data store persisting the data.
 *
 * @return void
 */
function wp_kama_woocommerce_after_object_type_save_action( $that, $data_store ){

	// action...
}
$that(WC_Data)
The object being saved.
$data_store(WC_Data_Store_WP)
THe data store persisting the data.

Where the hook is called

WC_Product::save()
woocommerce_after_(object_type)_object_save
WC_Abstract_Order::save()
woocommerce_after_(object_type)_object_save
WC_Data::save()
woocommerce_after_(object_type)_object_save
WC_Shipping_Zone::save()
woocommerce_after_(object_type)_object_save
woocommerce/includes/abstracts/abstract-wc-product.php 1451
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
woocommerce/includes/abstracts/abstract-wc-order.php 230
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
woocommerce/includes/abstracts/abstract-wc-data.php 250
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );
woocommerce/includes/class-wc-shipping-zone.php 287
do_action( 'woocommerce_after_' . $this->object_type . '_object_save', $this, $this->data_store );

Where the hook is used in WooCommerce

woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php 30
add_action( 'woocommerce_after_shipping_zone_object_save', array( __CLASS__, 'delete_zone_count_transient' ), 9 );