Skip to content

Instantly share code, notes, and snippets.

@hiranthi
Created October 29, 2013 19:35
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 hiranthi/7221115 to your computer and use it in GitHub Desktop.
Save hiranthi/7221115 to your computer and use it in GitHub Desktop.
function onx_reset_faceted_menus ()
{
if ( isset( $_GET['reset'] ) && class_exists( 'Shopp' ) )
{
// the part of the Shopp Object that holds the facet filtering info, make it empty
ShoppStorefront()->browsing = array();
// get the current url
$url = explode( '?', onx_full_url() );
// redirect to the current url, without the extra vars
wp_redirect( $url[0] ); exit;
}
} // end onx_reset_faceted_menus
add_action('wp','onx_reset_faceted_menus',1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment