Woocommerce add-to-cart shortcode – “ecommerce.add.products must have a name”
-
When using the woocommerce add-to-cart shortcode – Register by clicking add to cart [add_to_cart sku=”xxx-xxx-xxx” – the following error is received:
Google – dataLayer.push(): event: gtm4wp.addProductToCartEEC a.js:6
~ ERR: ecommerce.add.products must have a name or ID a.js:6
~ Object:
{
event: “gtm4wp.addProductToCartEEC”,
ecommerce: {
currencyCode: “CAD”,
add: {
products: [
{
“quantity: 1
}
]
}
}If the shortcode is changed to use the product_page shortcode, all is good.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Woocommerce add-to-cart shortcode – “ecommerce.add.products must have a name”’ is closed to new replies.