diff --git a/modules/ppcp-button/src/Assets/class-smartbutton.php b/modules/ppcp-button/src/Assets/class-smartbutton.php index 16a035a96..56b8c23df 100644 --- a/modules/ppcp-button/src/Assets/class-smartbutton.php +++ b/modules/ppcp-button/src/Assets/class-smartbutton.php @@ -686,7 +686,7 @@ class SmartButton implements SmartButtonInterface { } $params['disable-funding'] = implode( ',', array_unique( $disable_funding ) ); - $smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' ); + $smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' ); return $smart_button_url; } diff --git a/modules/ppcp-button/src/Endpoint/class-approveorderendpoint.php b/modules/ppcp-button/src/Endpoint/class-approveorderendpoint.php index e02f75797..c0a3ad5e6 100644 --- a/modules/ppcp-button/src/Endpoint/class-approveorderendpoint.php +++ b/modules/ppcp-button/src/Endpoint/class-approveorderendpoint.php @@ -54,6 +54,11 @@ class ApproveOrderEndpoint implements EndpointInterface { */ private $threed_secure; + /** + * The settings. + * + * @var Settings + */ private $settings; /** @@ -63,6 +68,7 @@ class ApproveOrderEndpoint implements EndpointInterface { * @param OrderEndpoint $order_endpoint The order endpoint. * @param SessionHandler $session_handler The session handler. * @param ThreeDSecure $three_d_secure The 3d secure helper object. + * @param Settings $settings The settings. */ public function __construct( RequestData $request_data, @@ -116,8 +122,8 @@ class ApproveOrderEndpoint implements EndpointInterface { if ( $order->payment_source() && $order->payment_source()->card() ) { if ( - $this->settings->has('disable_cards') - && in_array( strtolower($order->payment_source()->card()->brand()), (array) $this->settings->get( 'disable_cards' ), true ) + $this->settings->has( 'disable_cards' ) + && in_array( strtolower( $order->payment_source()->card()->brand() ), (array) $this->settings->get( 'disable_cards' ), true ) ) { throw new RuntimeException( __(