gravityflowwoocommerce_pre_update_entry

Description

The gravityflowwoocommerce_pre_update_entry action allows the processing to be overridden entirely.

Parameters

ParameterTypeDefinition
$entryEntryThe current entry.
$order_idIntThe WooCommerce Order ID.
$from_statusStringThe WooCommerce old order status.
$to_statusStringThe WooCommerce new order status..
$orderOrderThe WooCommerce Order object.

Examples

1
2
3
4
5
6
add_action( 'gravityflowwoocommerce_pre_update_entry', 'sh_gravityflowwoocommerce_pre_update_entry', 10, 5 );
    function sh_gravityflowwoocommerce_pre_update_entry($entry, $order_id, $from_status, $to_status, $order) {
     
        // Do something here..
         
    }

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?