Hello, Using 7.5 RC1, Twig activated
When using the Dynamic Content button on the bottom right corner of an element, the syntax (if I’m using the correct word for this) I’m getting doesn’t seem to work.
I’m using the following custom hook in the looper provider:
// loop through WooCommerce Products On Sale
add_filter('cs_looper_custom_onsale', function($result, $args){
$on_sale = wc_get_product_ids_on_sale();
$products = wc_get_products (
array('include' => $on_sale,)
);
return $products;
}, 10, 2);
When I use the dynamic content button to insert Looper > Current Item
I get {{ looper.item }}
.
However, if I insert Looper > Field > Key= "name"
I get {{ looper.field({"key":"name"}) }}
. And this doesn’t work.
After a lot of testing, I found that the correct way to get the name was {{ looper.item.name }}
.