From 5f46968f8ca6560c7f858960930fcf05357e17ec Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 25 Nov 2015 12:26:58 -0200 Subject: [PATCH] Hide style attribute add_to_cart shortcode when is empty closes #9694 --- includes/class-wc-shortcodes.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/class-wc-shortcodes.php b/includes/class-wc-shortcodes.php index 6afed725e26..a6759c41fc2 100644 --- a/includes/class-wc-shortcodes.php +++ b/includes/class-wc-shortcodes.php @@ -452,9 +452,11 @@ class WC_Shortcodes { return ''; } + $styles = empty( $atts['style'] ) ? '' : ' style="' . esc_attr( $atts['style'] ) . '"'; + ob_start(); ?> -

+

> get_price_html(); ?>