woocommerce_order_payment_status_changed action-hookWC 3.9.0

Fires when the order progresses from a pending payment status to a paid one.

Usage

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

Changelog

Since 3.9.0 Introduced.

Where the hook is called

WC_Order::status_transition()
woocommerce_order_payment_status_changed
woocommerce/includes/class-wc-order.php 435
do_action( 'woocommerce_order_payment_status_changed', $this->get_id(), $this );

Where the hook is used in WooCommerce

Usage not found.