Skip to content

Instantly share code, notes, and snippets.

@alewolf
Last active May 19, 2023 07:57
Show Gist options
  • Save alewolf/84f18a776ff2a7d28f98922930b7a560 to your computer and use it in GitHub Desktop.
Save alewolf/84f18a776ff2a7d28f98922930b7a560 to your computer and use it in GitHub Desktop.
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