mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix psalm
This commit is contained in:
parent
e9886cf185
commit
aafa11ad2b
1 changed files with 5 additions and 1 deletions
|
@ -200,7 +200,11 @@ class PayPalSubscriptionsModule implements ServiceModule, ExtendingModule, Execu
|
|||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
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' ) ?? '';
|
||||
if ( ! is_a( $subscription, WC_Subscription::class ) || ! $subscription_id ) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue