Hello,
Could I get some clarification on this post for creating a short code for attributes?
I have an Attribute for “Ships In”. I have placed the following in the functions.php
add_shortcode( ‘product_attributes’, ‘get_product_language’ );
function get_product_language()
{
global $product;
$product_attributes = $product->get_attributes();
$book_language = $product->get_attribute(‘pa_language’); // ships-in
return $book_language;
}
I wasn’t quite sure if the slug for Ships In should be used or the just as is.
Also, what would the structure of the shortcode in the editor be?
Thank you.