I\'m using woocommerce on wordpress to create a simple shop site and I\'ve added a couple attributes to a product. These are namely, size
and color
. Un
Hoping this is helpful to someone:
global $product;
// Get product attributes
$attributes = $product->get_attributes();
if ( ! $attributes ) {
echo "No attributes";
}
foreach ( $attributes as $attribute ) {
echo $attribute['name'] . ": ";
$product_attributes = array();
$product_attributes = explode('|',$attribute['value']);
$attributes_dropdown = '';
echo $attributes_dropdown;
}