woocommerce_coupon_object_updated_props хук-событиеWC 3.0.0

Устарел с версии 1.1.0. Больше не поддерживается и может быть удален. Используйте woocommerce_coupon_updated_props, which reports only current save's properties.

Fires after a coupon's properties have been updated, with its historical payload: the properties written by every save performed through this data store instance, accumulated with duplicates and never reset.

Использование

add_action( 'woocommerce_coupon_object_updated_props', 'wp_kama_woocommerce_coupon_object_updated_props_action', 10, 3 );

/**
 * Function for `woocommerce_coupon_object_updated_props` action-hook.
 * 
 * @param WC_Coupon $coupon        Coupon object.
 * @param string[]  $updated_props Properties updated by all saves through this data store instance,
 *                                 with duplicates.
 * @param           $string        
 *
 * @return void
 */
function wp_kama_woocommerce_coupon_object_updated_props_action( $coupon, $updated_props, $string ){
	// action...
}
$coupon(WC_Coupon)
Coupon object.
$updated_props(string[])
Properties updated by all saves through this data store instance, with duplicates.
$string
-

Список изменений

С версии 3.0.0 Введена.
Устарела с 11.1.0 Use woocommerce_coupon_updated_props, which reports only the current save's properties.

Где вызывается хук

WC_Coupon_Data_Store_CPT::update_post_meta()
woocommerce_coupon_object_updated_props
woocommerce/includes/data-stores/class-wc-coupon-data-store-cpt.php 340-345
do_action_deprecated(
	'woocommerce_coupon_object_updated_props',
	array( $coupon, $this->updated_props ),
	'11.1.0',
	'woocommerce_coupon_updated_props'
);

Где используется хук в WooCommerce

Использование не найдено.