mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 04:58:28 +08:00
18 lines
430 B
JavaScript
18 lines
430 B
JavaScript
/**
|
|
* @param {Object} scriptData
|
|
* @return {boolean}
|
|
*/
|
|
export const isPayPalSubscription = ( scriptData ) => {
|
|
return (
|
|
scriptData.data_client_id.has_subscriptions &&
|
|
scriptData.data_client_id.paypal_subscriptions_enabled
|
|
);
|
|
};
|
|
|
|
/**
|
|
* @param {Object} scriptData
|
|
* @return {boolean}
|
|
*/
|
|
export const cartHasSubscriptionProducts = ( scriptData ) => {
|
|
return !! scriptData?.locations_with_subscription_product?.cart;
|
|
};
|