Last active
May 19, 2023 07:57
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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