Hello Guys,
wanted to add following code to short coder Plugin, but its not working:
——————–
function displayProductName($item) {
$productName = get_the_title($item[‘id’]);
return $productName;
}
add_shortcode(‘product_name’, ‘displayProductName’);
——————-
Code should disdplay title of WOO product with id=”XYZ”
Used following shortcode: [sc name="woo_get_productname" id="8876"]
“woo_get_productname” was my given name in short coder.
Using Guntener Business Theme and Elementor Pro.
Thxs for your help, Markus