From 7288a2aca5bd6d0d9b64d0b1aa3611e80a4f84ce Mon Sep 17 00:00:00 2001 From: Giacomo Secchi Date: Sat, 10 Aug 2024 09:04:23 +0200 Subject: [PATCH] feat: Update maintenance mode hook to fire on 'wp' action --- includes/base/development/class-maintenance-mode.php | 2 +- mu-plugins/project-custom-functions.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/base/development/class-maintenance-mode.php b/includes/base/development/class-maintenance-mode.php index e18f549..73af342 100644 --- a/includes/base/development/class-maintenance-mode.php +++ b/includes/base/development/class-maintenance-mode.php @@ -35,7 +35,7 @@ public function register() { return; } - add_action( 'init', array( $this, 'check_excluded_pages' ) ); + add_action( 'wp', array( $this, 'check_excluded_pages' ) ); } diff --git a/mu-plugins/project-custom-functions.php b/mu-plugins/project-custom-functions.php index 56761e1..cefb5cf 100644 --- a/mu-plugins/project-custom-functions.php +++ b/mu-plugins/project-custom-functions.php @@ -47,11 +47,13 @@ function () { add_filter( 'writepoetry_maintenance_excluded_pages', function ( $condition ) { - $condition[''] = 'cart'; + $condition[] = 'cart'; + $condition[] = 'sample-page'; return $condition; } ); + // Choose to enable or disable product image zoom on product page (to disable change 'yes' to 'no'). add_filter( 'pre_option_writepoetry_product_zoom',