mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Fix psalm
This commit is contained in:
parent
e9886cf185
commit
aafa11ad2b
1 changed files with 5 additions and 1 deletions
|
@ -201,6 +201,10 @@ class PayPalSubscriptionsModule implements ServiceModule, ExtendingModule, Execu
|
||||||
*/
|
*/
|
||||||
function( $id ) use ( $c ) {
|
function( $id ) use ( $c ) {
|
||||||
$subscription = wcs_get_subscription( $id );
|
$subscription = wcs_get_subscription( $id );
|
||||||
|
if ( $subscription === false ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$subscription_id = $subscription->get_meta( 'ppcp_subscription' ) ?? '';
|
$subscription_id = $subscription->get_meta( 'ppcp_subscription' ) ?? '';
|
||||||
if ( ! is_a( $subscription, WC_Subscription::class ) || ! $subscription_id ) {
|
if ( ! is_a( $subscription, WC_Subscription::class ) || ! $subscription_id ) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue