Wrap conditonal in add to cart shortcode string output

Closes #16856
This commit is contained in:
Mike Jolley 2017-09-20 13:18:16 +01:00
parent d52677b0ac
commit 6aea8d0718
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ class WC_Shortcodes {
ob_start();
echo '<p class="product woocommerce add_to_cart_inline ' . esc_attr( $atts['class'] ) . '" style="' . empty( $atts['style'] ) ? '' : esc_attr( $atts['style'] ) . '">';
echo '<p class="product woocommerce add_to_cart_inline ' . esc_attr( $atts['class'] ) . '" style="' . ( empty( $atts['style'] ) ? '' : esc_attr( $atts['style'] ) ) . '">';
if ( wc_string_to_bool( $atts['show_price'] ) ) {
// @codingStandardsIgnoreStart