BUG WARNING AND SOLUTION: WC_Product::get_dimensions’, ‘3.0’
-
I found a BUG WARNING:
1-‘WC_Product::get_dimensions’, ‘3.0’, ‘By default, get_dimensions has an argument set to true so that HTML is returned. This is to support the legacy version of the method. To get HTML dimensions, instead use wc_format_dimensions() function. Pass false to this method to return an array of dimensions. This will be the new default behavior in future versions.
You should change wpc-smart-compare.php on line 1156 from
$wooscp_products_data[ $wooscp_product ][‘dimensions’] = $product->get_dimensions();
to
$wooscp_products_data[ $wooscp_product ][‘dimensions’] = wc_format_dimensions( $product->get_dimensions( false ) );
- The topic ‘BUG WARNING AND SOLUTION: WC_Product::get_dimensions’, ‘3.0’’ is closed to new replies.