woocommerce_cancelled_order

woocommerce_cancelled_order

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_cancelled_order') is found 1 times:

  • /includes/class-wc-form-handler.php line 768
    				$order->update_status( 'cancelled', __( 'Order cancelled by customer.', 'woocommerce' ) );
    
    				wc_add_notice( apply_filters( 'woocommerce_order_cancelled_notice', __( 'Your order was cancelled.', 'woocommerce' ) ), apply_filters( 'woocommerce_order_cancelled_notice_type', 'notice' ) );
    
    				do_action( 'woocommerce_cancelled_order', $order->get_id() );
    
    			} elseif ( $user_can_cancel && ! $order_can_cancel ) {
    				wc_add_notice( __( 'Your order can no longer be cancelled. Please contact us if you need assistance.', 'woocommerce' ), 'error' );
    			} else {
    				wc_add_notice( __( 'Invalid order.', 'woocommerce' ), 'error' );
    			}
    

See this hook used in plugins: