mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
phpcs
This commit is contained in:
parent
1537ae6540
commit
8478a7e18a
2 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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(
|
||||
__(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue