Fix is_editing check

This commit is contained in:
Alex P 2024-01-05 12:07:29 +02:00
parent 40e4658576
commit d3a318934f
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -262,7 +262,7 @@ class PayPalPaymentMethod extends AbstractPaymentMethodType {
*/ */
private function is_editing(): bool { private function is_editing(): bool {
if ( ! function_exists( 'get_current_screen' ) ) { if ( ! function_exists( 'get_current_screen' ) ) {
return true; return false;
} }
$screen = get_current_screen(); $screen = get_current_screen();
return $screen && $screen->is_block_editor(); return $screen && $screen->is_block_editor();