-
Notifications
You must be signed in to change notification settings - Fork 1
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
8 restrict content pro failed payment issues #9
8 restrict content pro failed payment issues #9
Conversation
I made a change so that in case of failure the RCP payment status will only be updated for the last payment too, to prevent a first payment which expires later will not override the succesful payment status of a second payment. |
src/Extension.php
Outdated
$this_pronamic_payment_id = (string) $payment->get_id(); | ||
$last_pronamic_payment_id = (string) \rcp_get_payment_meta( $rcp_payment_id, '_pronamic_payment_id', true ); | ||
|
||
if ( empty( $last_pronamic_payment_id ) || $this_pronamic_payment_id === $last_pronamic_payment_id ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rvdsteege Don't us empty
?
https://dev.to/aleksikauppila/using-isset-and-empty-hurts-your-code-aaa
Doesn't PHPStan also advise not to use this?
PR for:
https://wordpress.org/support/topic/rcp-failed-payment-issues/#post-17016396