From d5040072eef61eb1ed68eb96098bede5e81301a2 Mon Sep 17 00:00:00 2001 From: Dinwy Date: Fri, 19 Jul 2024 16:08:28 +0900 Subject: [PATCH] Remove rendering page check because you can add blocks anywhere you want --- includes/class-wc-gateway-komoju-block.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/includes/class-wc-gateway-komoju-block.php b/includes/class-wc-gateway-komoju-block.php index 94ea126..572755e 100644 --- a/includes/class-wc-gateway-komoju-block.php +++ b/includes/class-wc-gateway-komoju-block.php @@ -45,10 +45,6 @@ public function get_payment_method_script_handles() public function get_payment_method_data() { - if (!(is_checkout() || $this->is_site_editor())) { - return; - } - // We lazily fetch one session to be shared by all payment methods with dynamic fields. static $checkout_session; if (is_null($checkout_session)) { @@ -71,9 +67,4 @@ public function get_payment_method_data() 'inlineFields' => $this->gateway->has_fields, ]; } - - private function is_site_editor() - { - return strpos($_SERVER['REQUEST_URI'], 'site-editor.php'); - } }