From c9d62e506a86b6cdb9c614dec2d233388c50c652 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 5 Nov 2018 18:40:00 -0200 Subject: [PATCH] Use hook instead --- includes/shortcodes/class-wc-shortcode-checkout.php | 2 -- includes/wc-template-hooks.php | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/shortcodes/class-wc-shortcode-checkout.php b/includes/shortcodes/class-wc-shortcode-checkout.php index dba4d03e6a5..7305eb6f1dd 100644 --- a/includes/shortcodes/class-wc-shortcode-checkout.php +++ b/includes/shortcodes/class-wc-shortcode-checkout.php @@ -79,8 +79,6 @@ class WC_Shortcode_Checkout { do_action( 'before_woocommerce_pay' ); - wc_print_notices(); - $order_id = absint( $order_id ); // Pay for existing order. diff --git a/includes/wc-template-hooks.php b/includes/wc-template-hooks.php index a606bce240c..ea6d722a071 100644 --- a/includes/wc-template-hooks.php +++ b/includes/wc-template-hooks.php @@ -300,3 +300,4 @@ add_action( 'woocommerce_before_cart', 'woocommerce_output_all_notices', 10 ); add_action( 'woocommerce_before_checkout_form', 'woocommerce_output_all_notices', 10 ); add_action( 'woocommerce_account_content', 'woocommerce_output_all_notices', 10 ); add_action( 'woocommerce_before_customer_login_form', 'woocommerce_output_all_notices', 10 ); +add_action( 'before_woocommerce_pay', 'woocommerce_output_all_notices', 10 );