WC_Product::get_dimensions argument
-
Maybe I’m the only one with this in my debug log:
The WC_Product::get_dimensions argument is deprecated since version 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.
Here’s the fix:
Open woocommerce-show-attributes.php in a text editor
change line 92 from
$dimensions=$product->get_dimensions();
to
$dimensions = wc_format_dimensions($product->get_dimensions(false));
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WC_Product::get_dimensions argument’ is closed to new replies.