From d6782567a2b30ae1ad9b33f8eb4d2cadc1225691 Mon Sep 17 00:00:00 2001 From: Andrew Benbow Date: Tue, 25 Mar 2014 12:10:08 +0000 Subject: [PATCH 1/2] Order cancelled tweaks Add filters for order cancelled message, change message class from success to info and allow to be filtered --- includes/class-wc-form-handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 includes/class-wc-form-handler.php diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php old mode 100644 new mode 100755 index 4ca7449f8be..e33828872bf --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -515,7 +515,7 @@ class WC_Form_Handler { $order->cancel_order( __('Order cancelled by customer.', 'woocommerce' ) ); // Message - wc_add_notice( __( 'Your order was cancelled.', 'woocommerce' ) ); + wc_add_notice( apply_filters( 'woocommerce_order_cancelled_message',__( 'Your order was cancelled.', 'woocommerce' ) ) , apply_filters( 'woocommerce_order_cancelled_status', 'notice' ) ); do_action( 'woocommerce_cancelled_order', $order->id ); From e8bc26f51c0f5008a4c0a781cbd763ffbf8d038e Mon Sep 17 00:00:00 2001 From: Andrew Benbow Date: Wed, 26 Mar 2014 09:58:51 +0000 Subject: [PATCH 2/2] Update class-wc-form-handler.php Updated as per comments --- includes/class-wc-form-handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index e33828872bf..2af26804172 100755 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -515,7 +515,7 @@ class WC_Form_Handler { $order->cancel_order( __('Order cancelled by customer.', 'woocommerce' ) ); // Message - wc_add_notice( apply_filters( 'woocommerce_order_cancelled_message',__( 'Your order was cancelled.', 'woocommerce' ) ) , apply_filters( 'woocommerce_order_cancelled_status', 'notice' ) ); + 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->id );