Skip to content

Instantly share code, notes, and snippets.

@croosen
Last active June 8, 2017 15:36
Show Gist options
  • Save croosen/b2a3badaf8302f86f5b2 to your computer and use it in GitHub Desktop.
Save croosen/b2a3badaf8302f86f5b2 to your computer and use it in GitHub Desktop.
WordPress - WooCommerce - show attributes in loop
// Get the attibutes
$attributes = $product->get_attributes();
// Loop and display the value
// var_dump $attributes to see what you can output
foreach ($attributes as $attribute) {
echo $attribute['value'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment