Last active
August 29, 2015 14:15
-
-
Save bobbiejwilson/9dfb43cfa0c72fb3b8a3 to your computer and use it in GitHub Desktop.
Woocommerce Store Closing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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