woocommerce_order_status_changed

woocommerce_order_status_changed

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.4.2

do_action('woocommerce_order_status_changed') is found 1 times:

  • /includes/class-wc-order.php line 421
    					// Note the transition occurred.
    					$this->add_status_transition_note( $transition_note, $status_transition );
    
    					do_action( 'woocommerce_order_status_' . $status_transition['from'] . '_to_' . $status_transition['to'], $this->get_id(), $this );
    					do_action( 'woocommerce_order_status_changed', $this->get_id(), $status_transition['from'], $status_transition['to'], $this );
    
    					// Work out if this was for a payment, and trigger a payment_status hook instead.
    					if (
    						in_array( $status_transition['from'], apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'pending', 'failed' ), $this ), true )
    						&& in_array( $status_transition['to'], wc_get_is_paid_statuses(), true )
    					) {
    

See this hook used in plugins: