FIx installed list filter
This commit is contained in:
parent
2f7e57fb5b
commit
60ef6dbbaf
|
@ -87,11 +87,7 @@ export default function MySubscriptions(): JSX.Element {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const subscriptionsInstalled: Array< Subscription > = subscriptions.filter(
|
const subscriptionsInstalled: Array< Subscription > = subscriptions.filter(
|
||||||
( subscription: Subscription ) =>
|
( subscription: Subscription ) => subscription.local.installed
|
||||||
subscription.local.active &&
|
|
||||||
( subscription.active ||
|
|
||||||
subscription.product_key === '' ||
|
|
||||||
subscription.expired )
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const tableHeadersAvailable = [
|
const tableHeadersAvailable = [
|
||||||
|
@ -136,8 +132,10 @@ export default function MySubscriptions(): JSX.Element {
|
||||||
return __( 'Not found', 'woocommerce' );
|
return __( 'Not found', 'woocommerce' );
|
||||||
} else if ( subscription.expired ) {
|
} else if ( subscription.expired ) {
|
||||||
return __( 'Expired', 'woocommerce' );
|
return __( 'Expired', 'woocommerce' );
|
||||||
|
} else if ( subscription.active ) {
|
||||||
|
return __( 'Active', 'woocommerce' );
|
||||||
}
|
}
|
||||||
return __( 'Active', 'woocommerce' );
|
return __( 'Inactive', 'woocommerce' );
|
||||||
};
|
};
|
||||||
|
|
||||||
const getVersion = ( subscription: Subscription ): string => {
|
const getVersion = ( subscription: Subscription ): string => {
|
||||||
|
|
Loading…
Reference in New Issue