/**
* @snippet WooCommerce Holiday/Pause Mode
* @how-to Get CustomizeWoo.com FREE
* @sourcecode https://businessbloomer.com/?p=20862
* @author Rodolfo Melogli
* @testedwith WooCommerce 3.5.1
*/
// Trigger Holiday Mode
add_action ('init', 'bbloomer_woocommerce_holiday_mode');
// Disable Cart, Checkout, Add Cart
function bbloomer_woocommerce_holiday_mode() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
add_action( 'woocommerce_before_main_content', 'bbloomer_wc_shop_disabled', 5 );
add_action( 'woocommerce_before_cart', 'bbloomer_wc_shop_disabled', 5 );
add_action( 'woocommerce_before_checkout_form', 'bbloomer_wc_shop_disabled', 5 );
}
// Show Holiday Notice
function bbloomer_wc_shop_disabled() {
wc_print_notice( 'SKLEP W FERIE NIECZYNNY :)', 'error');
}
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
Warning: Cannot modify header information - headers already sent by (output started at /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-content/themes/twentytwenty/functions.php:1) in /home/klient.dhosting.pl/paweltuga/pacynki.dfirma.pl/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1378
{"id":381,"date":"2020-12-06T01:42:30","date_gmt":"2020-12-06T00:42:30","guid":{"rendered":"http:\/\/pacynki.pl?post_type=product&p=381"},"modified":"2020-12-11T14:46:54","modified_gmt":"2020-12-11T13:46:54","slug":"krzyzak","status":"publish","type":"product","link":"https:\/\/pacynki.pl\/produkt\/krzyzak\/","title":{"rendered":"Krzy\u017cak"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"
Krzy\u017cak rycerz \u015bredniowieczny w bia\u0142ym stroju ozdobionym czarnym krzy\u017cem jest uzbrojony w miecz, kt\u00f3rym mo\u017cna bezpiecznie wojowa\u0107. Na g\u0142owie i r\u0119kach kolczuga. G\u0142owa, brzuch i nogi wypchane wat\u0105 poliestrow\u0105, bu\u017aka haftowana. Wzrost 36 cm.<\/p>\n
<\/p>\n","protected":false},"featured_media":382,"template":"","meta":[],"_links":{"self":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/product\/381"}],"collection":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/media\/382"}],"wp:attachment":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/media?parent=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}