Title: Create class=&#8221;gtm4wp_productdata&#8221;
Last modified: October 8, 2020

---

# Create class=”gtm4wp_productdata”

 *  [saens](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/create-classgtm4wp_productdata/)
 * Hi,
    To display variable products in all of their variaties I’ve made my own 
   function to create the HTML for that. Is there a way I can call a function in
   your plugin to have gtm4wp create the data-fields for EEC to work on those? Or
   maybe use some other solid way to achieve this?
 * If so, how can I call it from my own .php file?
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/create-classgtm4wp_productdata/#post-13513148)
 * Hi,
 * On variable product details pages, the woocommerce_after_add_to_cart_button hook
   is being used to add additional entries into the cart form that is being used
   by GTM4WP for various events.
 * I am not sure how this is affected by your design changes but this has to be 
   run correctly during page load.

Viewing 1 replies (of 1 total)

The topic ‘Create class=”gtm4wp_productdata”’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/create-classgtm4wp_productdata/#post-13513148)
 * Status: not resolved