parent
c92d9d4a49
commit
3c06dab0e8
|
@ -284,6 +284,8 @@ class WC_Order extends WC_Abstract_Order {
|
|||
*/
|
||||
protected function status_transition() {
|
||||
if ( $this->status_transition ) {
|
||||
do_action( 'woocommerce_order_status_' . $this->status_transition['to'], $this->get_id() );
|
||||
|
||||
if ( ! empty( $this->status_transition['from'] ) ) {
|
||||
/* translators: 1: old order status 2: new order status */
|
||||
$transition_note = sprintf( __( 'Order status changed from %1$s to %2$s.', 'woocommerce' ), wc_get_order_status_name( $this->status_transition['from'] ), wc_get_order_status_name( $this->status_transition['to'] ) );
|
||||
|
@ -295,8 +297,6 @@ class WC_Order extends WC_Abstract_Order {
|
|||
$transition_note = sprintf( __( 'Order status set to %s.', 'woocommerce' ), wc_get_order_status_name( $this->status_transition['to'] ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_order_status_' . $this->status_transition['to'], $this->get_id() );
|
||||
|
||||
// Note the transition occured
|
||||
$this->add_order_note( trim( $this->status_transition['note'] . ' ' . $transition_note ), 0, $this->status_transition['manual'] );
|
||||
|
||||
|
|
Loading…
Reference in New Issue