Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merchant can change subscription payment method #597

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

mmaymo
Copy link
Collaborator

@mmaymo mmaymo commented Nov 16, 2021

Handles MOL-288

@mmaymo mmaymo requested a review from Dinamiko November 16, 2021 11:47
$payment = Mollie_WC_Plugin::getApiHelper()->getApiClient( $test_mode )->payments->create( $data );
//update the valid mandate for this order
if ((property_exists($payment, 'mandateId')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to simply use isset here, because it does return false if the property exist but is null, while property_exists returns true and you need to check that is not null afterwards as in your current conditional.

so instead of:
if ((property_exists($payment, 'mandateId') && $payment->mandateId !== null)

just:
isset($payment->mandateId)

Copy link
Contributor

@Dinamiko Dinamiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I´m approving the PR. I just leaved a little comment about using isset over property_exists.

@FawadNL
Copy link

FawadNL commented Sep 2, 2022

What is the status of this PR? @Dinamiko

@FawadNL
Copy link

FawadNL commented Aug 5, 2023

It’s been a year, any update here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants