Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
add_filter( 'wc_add_to_cart_params', 'kingcotton_remove_query_strings' );
add_filter( 'woocommerce_params', 'kingcotton_remove_query_strings' );
function kingcotton_remove_query_strings( $params ) {
$params['wc_ajax_url'] = '/?wc-ajax=%%endpoint%%';
return $params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment