woocommerce_fulfillment_after_update
Action to perform after a fulfillment is updated.
Usage
add_action( 'woocommerce_fulfillment_after_update', 'wp_kama_woocommerce_fulfillment_after_update_action', 10, 3 );
/**
* Function for `woocommerce_fulfillment_after_update` action-hook.
*
* @param Fulfillment $data The fulfillment object that was updated.
* @param array $changes The changes that were applied, as returned by Fulfillment::get_changes() before save. Core data props at top level, meta changes under 'meta_data'.
* @param string $previous_status The fulfillment status before the update.
*
* @return void
*/
function wp_kama_woocommerce_fulfillment_after_update_action( $data, $changes, $previous_status ){
// action...
}
- $data(Fulfillment)
- The fulfillment object that was updated.
- $changes(array)
- The changes that were applied, as returned by Fulfillment::get_changes() before save. Core data props at top level, meta changes under 'meta_data'.
- $previous_status(string)
- The fulfillment status before the update.
Changelog
| Since 10.1.0 | Introduced. |
| Since 10.7.0 | Added $changes and $previous_status parameters. |
Where the hook is called
woocommerce_fulfillment_after_update
woocommerce/src/Admin/Features/Fulfillments/DataStore/FulfillmentsDataStore.php 266
do_action( 'woocommerce_fulfillment_after_update', $data, $changes, $previous_status );
Where the hook is used in WooCommerce
woocommerce/src/Admin/Features/Fulfillments/FulfillmentOrderNotes.php 31
add_action( 'woocommerce_fulfillment_after_update', array( $this, 'add_fulfillment_updated_note' ), 10, 3 );
woocommerce/src/Admin/Features/Fulfillments/FulfillmentsManager.php 61
add_action( 'woocommerce_fulfillment_after_update', array( $this, 'update_order_fulfillment_status_on_fulfillment_update' ), 10, 1 );