Skip to content

Commit

Permalink
Remove rendering page check because you can add blocks anywhere you want
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinwy committed Jul 19, 2024
1 parent 1a650ec commit d504007
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions includes/class-wc-gateway-komoju-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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');
}
}

0 comments on commit d504007

Please sign in to comment.