/** * @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":388,"date":"2020-12-06T01:50:55","date_gmt":"2020-12-06T00:50:55","guid":{"rendered":"http:\/\/pacynki.plwp-content\/uploads\/2020\/12\/Lowiczanka_14.jpg"},"modified":"2020-12-06T01:50:55","modified_gmt":"2020-12-06T00:50:55","slug":"lowiczanka_14","status":"inherit","type":"attachment","link":"https:\/\/pacynki.pl\/?attachment_id=388","title":{"rendered":"Lowiczanka_14"},"author":1,"comment_status":"open","ping_status":"closed","template":"","meta":[],"description":{"rendered":"

\"\"<\/a><\/p>\n"},"caption":{"rendered":""},"alt_text":"","media_type":"image","mime_type":"image\/jpeg","media_details":{"width":800,"height":800,"file":"2020\/12\/Lowiczanka_14.jpg","sizes":{"medium":{"file":"Lowiczanka_14-300x300.jpg","width":300,"height":300,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-300x300.jpg"},"thumbnail":{"file":"Lowiczanka_14-150x150.jpg","width":150,"height":150,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-150x150.jpg"},"medium_large":{"file":"Lowiczanka_14-768x768.jpg","width":768,"height":768,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-768x768.jpg"},"woocommerce_thumbnail":{"file":"Lowiczanka_14-450x750.jpg","width":450,"height":750,"uncropped":false,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-450x750.jpg"},"woocommerce_single":{"file":"Lowiczanka_14-600x600.jpg","width":600,"height":600,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-600x600.jpg"},"woocommerce_gallery_thumbnail":{"file":"Lowiczanka_14-100x100.jpg","width":100,"height":100,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-100x100.jpg"},"shop_catalog":{"file":"Lowiczanka_14-450x750.jpg","width":450,"height":750,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-450x750.jpg"},"shop_single":{"file":"Lowiczanka_14-600x600.jpg","width":600,"height":600,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-600x600.jpg"},"shop_thumbnail":{"file":"Lowiczanka_14-100x100.jpg","width":100,"height":100,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14-100x100.jpg"},"full":{"file":"Lowiczanka_14.jpg","width":800,"height":800,"mime_type":"image\/jpeg","source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14.jpg"}},"image_meta":{"aperture":"2","credit":"Marta&Pawel","camera":"Canon EOS 60D","caption":"","created_timestamp":"1337536703","copyright":"","focal_length":"50","iso":"800","shutter_speed":"0.0025","title":"","orientation":"1","keywords":[]}},"post":384,"source_url":"https:\/\/pacynki.pl\/wp-content\/uploads\/2020\/12\/Lowiczanka_14.jpg","_links":{"self":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/media\/388"}],"collection":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/media"}],"about":[{"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/types\/attachment"}],"author":[{"embeddable":true,"href":"https:\/\/pacynki.pl\/wp-json\/wp\/v2\/users\/1"}]}}