diff --git a/modules/ppcp-button/src/Endpoint/CartScriptParamsEndpoint.php b/modules/ppcp-button/src/Endpoint/CartScriptParamsEndpoint.php index 848923876..6f086397f 100644 --- a/modules/ppcp-button/src/Endpoint/CartScriptParamsEndpoint.php +++ b/modules/ppcp-button/src/Endpoint/CartScriptParamsEndpoint.php @@ -67,10 +67,10 @@ class CartScriptParamsEndpoint implements EndpointInterface { */ public function handle_request(): bool { try { - if ( ! $this->smart_button instanceof SmartButton ) { - wp_send_json_error(); - return false; - } + if ( ! $this->smart_button instanceof SmartButton ) { + wp_send_json_error(); + return false; + } if ( is_callable( 'wc_maybe_define_constant' ) ) { wc_maybe_define_constant( 'WOOCOMMERCE_CART', true );