(hook_prefix)updated
Fires after a single object is updated via the REST API.
Usage
add_action( '(hook_prefix)updated', 'wp_kama_hook_prefixupdated_action', 10, 2 );
/**
* Function for `(hook_prefix)updated` action-hook.
*
* @param WC_Data $order Inserted object.
* @param WP_REST_Request $request Request object.
*
* @return void
*/
function wp_kama_hook_prefixupdated_action( $order, $request ){
// action...
}
- $order(WC_Data)
- Inserted object.
- $request(WP_REST_Request)
- Request object.
Changelog
| Since 10.2.0 | Introduced. |
Where the hook is called
woocommerce/src/Internal/RestApi/Routes/V4/Orders/Controller.php 388
do_action( $this->get_hook_prefix() . 'updated', $order, $request );
woocommerce/src/Internal/RestApi/Routes/V4/Customers/Controller.php 311
do_action( $this->get_hook_prefix() . 'updated', $user_data, $request );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-install.php 353
add_action( 'woocommerce_updated', array( __CLASS__, 'enable_email_improvements_for_existing_merchants' ), 20 );
woocommerce/includes/class-wc-post-data.php 72
add_action( 'woocommerce_attribute_updated', array( __CLASS__, 'handle_global_attribute_updated' ), 50, 3 );
woocommerce/includes/class-wc-post-data.php 78
add_action( 'woocommerce_product_attributes_updated', array( __CLASS__, 'on_product_attributes_updated' ), 10, 1 );
woocommerce/includes/class-woocommerce.php 322
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_inbox_variant' ) );
woocommerce/includes/class-woocommerce.php 325
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_remote_variant' ) );
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 212
add_action( 'woocommerce_updated', array( $this, 'maybe_onboard_with_transact' ) );
woocommerce/src/Admin/Features/MarketingRecommendations/Init.php 32
add_action( 'woocommerce_updated', array( __CLASS__, 'delete_specs_transient' ) );
woocommerce/src/Internal/Admin/Onboarding/OnboardingMailchimp.php 35
add_action( 'woocommerce_onboarding_profile_data_updated', array( $this, 'on_profile_data_updated' ), 10, 2 );
woocommerce/src/Internal/Admin/RemoteFreeExtensions/Init.php 23
add_action( 'woocommerce_updated', array( __CLASS__, 'delete_specs_transient' ) );
woocommerce/src/Internal/Email/EmailStyleSync.php 36
add_action( 'wp_theme_json_data_updated', array( $this, 'sync_email_styles_with_theme' ) );