Skip to content

Instantly share code, notes, and snippets.

@mhackersu
Created November 27, 2018 21:27
Show Gist options
  • Save mhackersu/e55147e6bab8c9e354d905cdaa1882fe to your computer and use it in GitHub Desktop.
Save mhackersu/e55147e6bab8c9e354d905cdaa1882fe to your computer and use it in GitHub Desktop.
/*
* Disable Continue shopping message after add to cart.
*/
add_filter( 'wc_add_to_cart_message', function( $string, $product_id = 0 ) {
$start = strpos( $string, '<a href=' ) ?: 0;
$end = strpos( $string, '</a>', $start ) ?: 0;
return substr( $string, $end ) ?: $string;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment