I’m using WooCommerce and Elementor Pro. Is there any way to add specific product attributes (e.g. gross and net weight) below the Add to cart button?
It seems like an obvious thing but I haven’t found options or snippets for it.
2
First you add attributes to product. Then you use this snippet in functions.php:
// maybe remove tab with attributes add_filter( 'woocommerce_product_tabs', 'remove_info', 100, 1 ); function remove_info( $tabs ) { unset($tabs['additional_information']); return $tabs; } // show attributes add_action( 'woocommerce_single_product_summary', 'summary_attributes', 35 ); function summary_attributes() { global $product; if ( $product->has_attributes() ) { wc_display_product_attributes( $product ); } }
Setting Up WooCommerce Attributes
Configure The Attributes
After creating attribute, now we can add different variation on your product. Click on the Configure Terms option.
To understand it in a better way you can follow this tutorial
Click here to cancel reply.
2
Answers
First you add attributes to product. Then you use this snippet in functions.php:
Setting Up WooCommerce Attributes
Configure The Attributes
After creating attribute, now we can add different variation on your product. Click on the Configure Terms option.
To understand it in a better way you can follow this tutorial