Self-pickup orders take up to 2 working days after purchase.
You’ll be notified when your order is ready for collection.
Okay
/**
* Force trigger an admin email notification on order cancellation
* or when handled through custom YITH workflows.
*/
function trigger_admin_cancelled_order_alert( $order_id, $old_status, $new_status ) {
if ( $new_status === 'cancelled' ) {
$order = wc_get_order( $order_id );
if ( $order ) {
// Grab the main WooCommerce instance for emails
$mailer = WC()->mailer()->get_emails();
// Explicitly trigger the Cancelled Order email to admin/recipients
if ( isset( $mailer['WC_Email_Cancelled_Order'] ) ) {
$mailer['WC_Email_Cancelled_Order']->trigger( $order_id );
}
}
}
}
add_action( 'woocommerce_order_status_changed', 'trigger_admin_cancelled_order_alert', 10, 3 );