woocommerce_order_payment_status_changed
Fires when the order progresses from a pending payment status to a paid one.
Использование
add_action( 'woocommerce_order_payment_status_changed', 'wp_kama_woocommerce_order_payment_status_changed_action', 10, 2 ); /** * Function for `woocommerce_order_payment_status_changed` action-hook. * * @param int $id Order ID * @param WC_Order $that Order object * * @return void */ function wp_kama_woocommerce_order_payment_status_changed_action( $id, $that ){ // action... }
- $id(int)
- Order ID
- $that(WC_Order)
- Order object
Список изменений
С версии 3.9.0 | Введена. |
Где вызывается хук
woocommerce_order_payment_status_changed
woocommerce/includes/class-wc-order.php 435
do_action( 'woocommerce_order_payment_status_changed', $this->get_id(), $this );