Skip to content

Instantly share code, notes, and snippets.

@bobbiejwilson
Last active August 29, 2015 14:15
Show Gist options
  • Save bobbiejwilson/9dfb43cfa0c72fb3b8a3 to your computer and use it in GitHub Desktop.
Save bobbiejwilson/9dfb43cfa0c72fb3b8a3 to your computer and use it in GitHub Desktop.
Woocommerce Store Closing
<?php
//Add to functions.php. Set the redirect to the proper permalink for notice
add_action('template_redirect','store_closed');
function store_closed(){
if (!is_admin() && is_woocommerce()){
wp_redirect('/store-closed/');
exit;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment