Skip to content

Instantly share code, notes, and snippets.

@atwellpub
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atwellpub/333c622c6d0be660d219 to your computer and use it in GitHub Desktop.
Save atwellpub/333c622c6d0be660d219 to your computer and use it in GitHub Desktop.
Possible woocommerce + landing pages compatibility fix. Add this to your theme's functions.php file
<?php
/* Remove all tracking classes from cart page */
add_action('wp_footer' , 'inbound_remove_cart_tracking_class' );
/**
* Removes tracking classes from forms containing the name 'proceeed'
*/
function inbound_remove_cart_tracking_class() {
?>
<script type='text/javascript'>
jQuery( document ).ready(function() {
jQuery('input[name="proceed"]').closest("form").removeClass('wpl-track-me');
})
</script>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment