Merge pull request #7552 from NickIvanter/patch-6
Allow custom CSS classes to be specified for [product] shortcode
This commit is contained in:
commit
8a42ed06f1
|
@ -466,7 +466,14 @@ class WC_Shortcodes {
|
|||
|
||||
wp_reset_postdata();
|
||||
|
||||
return '<div class="woocommerce">' . ob_get_clean() . '</div>';
|
||||
$css_class = 'woocommerce';
|
||||
|
||||
if ( isset( $atts['class'] ) ) {
|
||||
|
||||
$css_class .= ' ' . $atts['class'];
|
||||
}
|
||||
|
||||
return '<div class="' . esc_attr( $css_class ) . '">' . ob_get_clean() . '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue