product() public static method

Display a single product.
public static product ( array $atts ) : string
$atts array
return string
 /**
  * New code of the [product] shortcode.
  *
  * @param  assoc $atts
  * @return string
  */
 public function shortcode_product($atts)
 {
     $result = WC_Shortcodes::product($atts);
     if ($result) {
         $new_result = preg_replace('/^<div class="woocommerce">\\s*<div class="row">/', '<div class="woocommerce"><div class="row"><div class="col-md-12">', trim($result));
         if ($new_result != $result) {
             return $new_result . '</div>';
         }
     }
     return $result;
 }