Skip to content

Instantly share code, notes, and snippets.

@alewolf
Last active May 19, 2023 07:57
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Enable product ID output for woopt Pixel Manager Google Ads dynamic remarketing for the WooCommerce Google Listing and Ads plugin
<?php
// Place the following code into your functions.php file in your child theme
add_filter('wooptpm_product_ids', function ($product_ids, $product) {
$product_ids['gla'] = 'gla_' . $product->get_id();
return $product_ids;
}, 10, 2);
add_filter('wooptpm_product_id_type_for_google_ads', function () {
return 'gla';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment