Answers for "wooCommerce product size weight"

0

woo commerce print size and weight on product page

add_action ('woocommerce_single_product_summary', 'show_weight', 20);
function show_weight() {
global $product;
$weight_unit = get_option('woocommerce_weight_unit');
$attributes = $product->get_attributes();
if ( $product->has_weight() ) {
print '<p>Weight: '.$product->get_weight(). $weight_unit . '</p>'.PHP_EOL;
}
}
Posted by: Guest on August-14-2020

Code answers related to "wooCommerce product size weight"

Browse Popular Code Answers by Language