View rename_as_tables.sql
This file contains 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
RENAME TABLE | |
wp_actionscheduler_logs TO custom_prefix_actionscheduler_logs, | |
wp_actionscheduler_groups TO custom_prefix_actionscheduler_groups, | |
wp_actionscheduler_claims TO custom_prefix_actionscheduler_claims, | |
wp_actionscheduler_actions TO custom_prefix_actionscheduler_actions |
View fire-view-item-event-on-unselected-variable-products.php
This file contains 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 | |
/** | |
* If you want to fire the ViewItem event on variable products when | |
* no variation has been selected yet, then use the following code in | |
* your functions.php file. | |
*/ | |
add_action('wp_footer', function () { | |
?> | |
<script> |
View track-view-item-event-in-facebook.php
This file contains 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 | |
/** | |
* Track ViewItem events in Facebook using the WooCommerce Pixel Manager | |
* Add this to functions.php | |
*/ | |
add_action('wp_footer', function (){ | |
?> | |
<script> |
View custom-add-to-cart-conversion.php
This file contains 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 | |
/** | |
* Track custom add-to-cart conversions using the WooCommerce Pixel Manager | |
* | |
* Add this to your functions.php file | |
*/ | |
add_action('wp_footer', function () { | |
?> |
View gads-id-for-wc-google-listing-ads.php
This file contains 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); | |
View freemius-gtm-conversion-tracking.js
This file contains 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
// First you'll need to load the gtag.js library | |
function load_library(){ | |
echo '<script async src="https://www.googletagmanager.com/gtag/js?id=GA_UA_PROPERTY_ID"></script>'; | |
} | |
// Then output the conversion tracking scripts | |
// The Google Ads conversion ID must include the "AW-" in front of the number | |
function (response) |
View wooptpm-add-custom-dimensions-event-for-ga.php
This file contains 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
<? | |
add_action('wp_head', function () { | |
?> | |
<script> | |
jQuery(document).on('wooptpmAddToCart', function (event, product) { | |
gtag('event', 'add_to_cart', { | |
"send_to" : wooptpmDataLayer.pixels.google.analytics.universal.property_id, // this is important to scope it to only GA UA and not send it to other properties | |
'ecomm_prodid': product.dyn_r_ids[wooptpmDataLayer.pixels.google.analytics.id_type], // you must make sure that the same ID type is being used for GA and Google Ads | |
'ecomm_pagetype': wooptpmDataLayer.shop.page_type, |
View wooptpm-add-custom-dimensions-to-ga-ua.php
This file contains 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
<? | |
add_filter('wooptpm_ga_ua_parameters', function ($analytics_parameters, $analytics_id){ | |
$analytics_parameters['custom_map'] = [ | |
'dimension1' => 'ecomm_prodid', | |
'dimension2' => 'ecomm_pagetype', | |
'dimension3' => 'ecomm_totalvalue', | |
]; | |
return $analytics_parameters; |
View wooptpm_order_items_1.php
This file contains 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 | |
// The product ID must be changed and must match the specific product that you want to be removed | |
add_filter('wooptpm_order_items', function ($order_items, $order){ | |
foreach($order_items as $item_id => $item ){ | |
$product = $item->get_product(); | |
if($product->get_id() === 14 && $item->get_total() == 0) unset($order_items[$item_id]); |
NewerOlder