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.8.7.0

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: