Check type

This commit is contained in:
Alex P 2023-10-05 10:06:47 +03:00
parent e530382a7c
commit e083484ad7
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -656,7 +656,7 @@ class SubscriptionModule implements ModuleInterface {
* @psalm-suppress MissingClosureParamType
*/
function( $actions, $subscription ): array {
if ( ! is_a( $subscription, WC_Subscription::class ) ) {
if ( ! is_array( $actions ) || ! is_a( $subscription, WC_Subscription::class ) ) {
return $actions;
}