Fix phpcs

This commit is contained in:
Emili Castells Guasch 2024-04-10 17:05:33 +02:00
parent dd53229e8d
commit bd9f80f82f
4 changed files with 41 additions and 41 deletions

View file

@ -115,7 +115,7 @@ class PaymentMethodTokensEndpoint {
* @throws RuntimeException When something when wrong with the request.
* @throws PayPalApiException When something when wrong setting up the token.
*/
public function create_payment_token(PaymentSource $payment_source ): stdClass {
public function create_payment_token( PaymentSource $payment_source ): stdClass {
$data = array(
'payment_source' => array(
$payment_source->name() => $payment_source->properties(),

View file

@ -323,7 +323,7 @@ class SavePaymentMethodsModule implements ModuleInterface {
'Something went wrong. Please try again or choose another payment source.',
'woocommerce-paypal-payments'
),
)
),
),
)
);

View file

@ -536,10 +536,10 @@ class PayPalGateway extends \WC_Payment_Gateway {
&& $this->is_free_trial_order( $wc_order )
&& ! $this->subscription_helper->paypal_subscription_id()
) {
$ppcp_guest_payment_for_free_trial = WC()->session->get( 'ppcp_guest_payment_for_free_trial') ?? null;
if($this->vault_v3_enabled && $ppcp_guest_payment_for_free_trial) {
$ppcp_guest_payment_for_free_trial = WC()->session->get( 'ppcp_guest_payment_for_free_trial' ) ?? null;
if ( $this->vault_v3_enabled && $ppcp_guest_payment_for_free_trial ) {
$customer_id = $ppcp_guest_payment_for_free_trial->customer->id ?? '';
if($customer_id) {
if ( $customer_id ) {
update_user_meta( $wc_order->get_customer_id(), '_ppcp_target_customer_id', $customer_id );
}
@ -556,7 +556,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
);
}
WC()->session->set( 'ppcp_guest_payment_for_free_trial', null);
WC()->session->set( 'ppcp_guest_payment_for_free_trial', null );
$wc_order->payment_complete();
return $this->handle_payment_success( $wc_order );