Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shameemreza/3f2785125b3738900e825ea5d638cc21 to your computer and use it in GitHub Desktop.
Save shameemreza/3f2785125b3738900e825ea5d638cc21 to your computer and use it in GitHub Desktop.
Remove add to cart URL parameter after a product has been added to the cart in WooCommerce.
add_filter( 'woocommerce_add_to_cart_redirect', 'wp_get_referer' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment