diff --git a/modules.php b/modules.php index 7c74fa096..f94e97c31 100644 --- a/modules.php +++ b/modules.php @@ -20,7 +20,7 @@ return function ( string $root_dir ): iterable { ( require "$modules_dir/ppcp-onboarding/module.php" )(), ( require "$modules_dir/ppcp-session/module.php" )(), ( require "$modules_dir/ppcp-status-report/module.php" )(), - ( require "$modules_dir/ppcp-subscription/module.php" )(), + ( require "$modules_dir/ppcp-wc-subscriptions/module.php" )(), ( require "$modules_dir/ppcp-wc-gateway/module.php" )(), ( require "$modules_dir/ppcp-webhooks/module.php" )(), ( require "$modules_dir/ppcp-vaulting/module.php" )(), diff --git a/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php b/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php index abba2c182..4d7419cfa 100644 --- a/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php +++ b/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php @@ -27,7 +27,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\PatchCollectionFactory; use WooCommerce\PayPalCommerce\ApiClient\Helper\ErrorResponse; use WooCommerce\PayPalCommerce\ApiClient\Repository\ApplicationContextRepository; use Psr\Log\LoggerInterface; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\WcGateway\FraudNet\FraudNet; use WP_Error; diff --git a/modules/ppcp-api-client/src/Factory/AmountFactory.php b/modules/ppcp-api-client/src/Factory/AmountFactory.php index 51a6d8c11..236fff360 100644 --- a/modules/ppcp-api-client/src/Factory/AmountFactory.php +++ b/modules/ppcp-api-client/src/Factory/AmountFactory.php @@ -14,7 +14,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Entity\AmountBreakdown; use WooCommerce\PayPalCommerce\ApiClient\Entity\Item; use WooCommerce\PayPalCommerce\ApiClient\Entity\Money; use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway; use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway; diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 2c2762970..5ee1fd7d2 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -33,8 +33,8 @@ use WooCommerce\PayPalCommerce\Button\Helper\ContextTrait; use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply; use WooCommerce\PayPalCommerce\Onboarding\Environment; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway; diff --git a/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php b/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php index 4ee88c3c7..439d1c04d 100644 --- a/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php +++ b/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php @@ -30,7 +30,7 @@ use WooCommerce\PayPalCommerce\Button\Exception\ValidationException; use WooCommerce\PayPalCommerce\Button\Validation\CheckoutFormValidator; use WooCommerce\PayPalCommerce\Button\Helper\EarlyOrderHandler; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; use WooCommerce\PayPalCommerce\WcGateway\CardBillingMode; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway; diff --git a/modules/ppcp-compat/src/PPEC/SubscriptionsHandler.php b/modules/ppcp-compat/src/PPEC/SubscriptionsHandler.php index 90e2b5493..217374007 100644 --- a/modules/ppcp-compat/src/PPEC/SubscriptionsHandler.php +++ b/modules/ppcp-compat/src/PPEC/SubscriptionsHandler.php @@ -11,7 +11,7 @@ namespace WooCommerce\PayPalCommerce\Compat\PPEC; use Automattic\WooCommerce\Utilities\OrderUtil; use stdClass; -use WooCommerce\PayPalCommerce\Subscription\RenewalHandler; +use WooCommerce\PayPalCommerce\WcSubscriptions\RenewalHandler; use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentToken; /** diff --git a/modules/ppcp-saved-payment-checker/extensions.php b/modules/ppcp-saved-payment-checker/extensions.php index dad4983b4..c392ea6da 100644 --- a/modules/ppcp-saved-payment-checker/extensions.php +++ b/modules/ppcp-saved-payment-checker/extensions.php @@ -10,7 +10,7 @@ declare(strict_types=1); namespace WooCommerce\PayPalCommerce\SavedPaymentChecker; use WooCommerce\PayPalCommerce\Onboarding\State; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface; return array( diff --git a/modules/ppcp-saved-payment-checker/src/PaymentTokenChecker.php b/modules/ppcp-saved-payment-checker/src/PaymentTokenChecker.php index 0da73b51b..a94fe0d92 100644 --- a/modules/ppcp-saved-payment-checker/src/PaymentTokenChecker.php +++ b/modules/ppcp-saved-payment-checker/src/PaymentTokenChecker.php @@ -16,7 +16,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PaymentsEndpoint; use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PaymentTokenEndpoint; use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentToken; use WooCommerce\PayPalCommerce\ApiClient\Repository\OrderRepository; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway; diff --git a/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php b/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php index f04143ebc..5c2731336 100644 --- a/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php +++ b/modules/ppcp-saved-payment-checker/src/SavedPaymentCheckerModule.php @@ -11,7 +11,7 @@ namespace WooCommerce\PayPalCommerce\SavedPaymentChecker; use Psr\Log\LoggerInterface; use WC_Order; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider; use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface; use WooCommerce\PayPalCommerce\Vendor\Interop\Container\ServiceProviderInterface; diff --git a/modules/ppcp-status-report/src/StatusReportModule.php b/modules/ppcp-status-report/src/StatusReportModule.php index 4c2d3c8ae..ceef8301d 100644 --- a/modules/ppcp-status-report/src/StatusReportModule.php +++ b/modules/ppcp-status-report/src/StatusReportModule.php @@ -9,7 +9,7 @@ declare(strict_types=1); namespace WooCommerce\PayPalCommerce\StatusReport; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider; use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface; use WooCommerce\PayPalCommerce\Vendor\Interop\Container\ServiceProviderInterface; diff --git a/modules/ppcp-vaulting/src/CustomerApprovalListener.php b/modules/ppcp-vaulting/src/CustomerApprovalListener.php index 1b922511b..2241d038d 100644 --- a/modules/ppcp-vaulting/src/CustomerApprovalListener.php +++ b/modules/ppcp-vaulting/src/CustomerApprovalListener.php @@ -13,7 +13,7 @@ use Exception; use Psr\Log\LoggerInterface; use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PaymentTokenEndpoint; use WooCommerce\PayPalCommerce\ApiClient\Exception\AlreadyVaultedException; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; /** * Class CustomerApprovalListener diff --git a/modules/ppcp-vaulting/src/VaultedCreditCardHandler.php b/modules/ppcp-vaulting/src/VaultedCreditCardHandler.php index 04b1c8d5d..59e60b912 100644 --- a/modules/ppcp-vaulting/src/VaultedCreditCardHandler.php +++ b/modules/ppcp-vaulting/src/VaultedCreditCardHandler.php @@ -19,8 +19,8 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory; use WooCommerce\PayPalCommerce\ApiClient\Factory\PurchaseUnitFactory; use WooCommerce\PayPalCommerce\ApiClient\Factory\ShippingPreferenceFactory; use WooCommerce\PayPalCommerce\Onboarding\Environment; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\WcGateway\Processor\AuthorizedPaymentsProcessor; use WooCommerce\PayPalCommerce\WcGateway\Processor\OrderMetaTrait; use WooCommerce\PayPalCommerce\WcGateway\Processor\PaymentsStatusHandlingTrait; diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index c5a1b3933..48b474191 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -21,7 +21,7 @@ use WooCommerce\PayPalCommerce\Common\Pattern\SingletonDecorator; use WooCommerce\PayPalCommerce\Onboarding\Environment; use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingOptionsRenderer; use WooCommerce\PayPalCommerce\Onboarding\State; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface; use WooCommerce\PayPalCommerce\WcGateway\Admin\FeesRenderer; use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn; diff --git a/modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php b/modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php index 03a9c59b6..02e5eecd8 100644 --- a/modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php +++ b/modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php @@ -10,7 +10,7 @@ declare(strict_types=1); namespace WooCommerce\PayPalCommerce\WcGateway\Assets; use WooCommerce\PayPalCommerce\Onboarding\Environment; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; /** * Class SettingsPageAssets diff --git a/modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php b/modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php index 6afa24f31..de07ecfef 100644 --- a/modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php +++ b/modules/ppcp-wc-gateway/src/Checkout/DisableGateways.php @@ -11,7 +11,7 @@ namespace WooCommerce\PayPalCommerce\WcGateway\Checkout; use WooCommerce\PayPalCommerce\Button\Helper\ContextTrait; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CardButtonGateway; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway; use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway; diff --git a/modules/ppcp-wc-gateway/src/Gateway/CardButtonGateway.php b/modules/ppcp-wc-gateway/src/Gateway/CardButtonGateway.php index fecb495b6..a4d49e3e9 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/CardButtonGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/CardButtonGateway.php @@ -17,8 +17,8 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; use WooCommerce\PayPalCommerce\Onboarding\Environment; use WooCommerce\PayPalCommerce\Onboarding\State; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\WcGateway\Exception\GatewayGenericException; use WooCommerce\PayPalCommerce\WcGateway\Processor\OrderProcessor; diff --git a/modules/ppcp-wc-gateway/src/Gateway/CreditCardGateway.php b/modules/ppcp-wc-gateway/src/Gateway/CreditCardGateway.php index 1b99b9d05..a37487ceb 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/CreditCardGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/CreditCardGateway.php @@ -18,7 +18,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException; use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; use WooCommerce\PayPalCommerce\Onboarding\State; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\Vaulting\VaultedCreditCardHandler; use WooCommerce\PayPalCommerce\WcGateway\Exception\GatewayGenericException; diff --git a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php index b17e48a7a..427ac9a42 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php @@ -20,8 +20,8 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; use WooCommerce\PayPalCommerce\Onboarding\Environment; use WooCommerce\PayPalCommerce\Onboarding\State; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\FreeTrialHandlerTrait; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\WcGateway\Exception\GatewayGenericException; use WooCommerce\PayPalCommerce\WcGateway\FundingSource\FundingSourceRenderer; diff --git a/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php b/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php index db86034d6..e84a80b92 100644 --- a/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php +++ b/modules/ppcp-wc-gateway/src/Processor/AuthorizedPaymentsProcessor.php @@ -22,7 +22,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Entity\CaptureStatus; use WooCommerce\PayPalCommerce\ApiClient\Entity\Money; use WooCommerce\PayPalCommerce\ApiClient\Entity\Order; use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway; use WooCommerce\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice; diff --git a/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php b/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php index 1fb10ed8c..9550ccdb3 100644 --- a/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php +++ b/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php @@ -20,7 +20,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\OrderHelper; use WooCommerce\PayPalCommerce\Button\Helper\ThreeDSecure; use WooCommerce\PayPalCommerce\Onboarding\Environment; use WooCommerce\PayPalCommerce\Session\SessionHandler; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway; use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings; diff --git a/modules/ppcp-wc-gateway/src/WCGatewayModule.php b/modules/ppcp-wc-gateway/src/WCGatewayModule.php index 4796c2d5b..5214a4166 100644 --- a/modules/ppcp-wc-gateway/src/WCGatewayModule.php +++ b/modules/ppcp-wc-gateway/src/WCGatewayModule.php @@ -13,7 +13,7 @@ use Psr\Log\LoggerInterface; use Throwable; use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider; use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface; use WC_Order; diff --git a/modules/ppcp-subscription/.babelrc b/modules/ppcp-wc-subscriptions/.babelrc similarity index 100% rename from modules/ppcp-subscription/.babelrc rename to modules/ppcp-wc-subscriptions/.babelrc diff --git a/modules/ppcp-subscription/.gitignore b/modules/ppcp-wc-subscriptions/.gitignore similarity index 100% rename from modules/ppcp-subscription/.gitignore rename to modules/ppcp-wc-subscriptions/.gitignore diff --git a/modules/ppcp-subscription/composer.json b/modules/ppcp-wc-subscriptions/composer.json similarity index 59% rename from modules/ppcp-subscription/composer.json rename to modules/ppcp-wc-subscriptions/composer.json index b8f68646c..3cf50034b 100644 --- a/modules/ppcp-subscription/composer.json +++ b/modules/ppcp-wc-subscriptions/composer.json @@ -1,7 +1,7 @@ { - "name": "woocommerce/ppcp-subscription", + "name": "woocommerce/ppcp-wc-subscriptions", "type": "dhii-mod", - "description": "Subscription module for PPCP", + "description": "Module for WC Subscriptions plugin integration", "license": "GPL-2.0", "require": { "php": "^7.2 | ^8.0", @@ -9,7 +9,7 @@ }, "autoload": { "psr-4": { - "WooCommerce\\PayPalCommerce\\Subscription\\": "src" + "WooCommerce\\PayPalCommerce\\WcSubscriptions\\": "src" } }, "minimum-stability": "dev", diff --git a/modules/ppcp-subscription/extensions.php b/modules/ppcp-wc-subscriptions/extensions.php similarity index 58% rename from modules/ppcp-subscription/extensions.php rename to modules/ppcp-wc-subscriptions/extensions.php index 37b6d423a..d9df212e7 100644 --- a/modules/ppcp-subscription/extensions.php +++ b/modules/ppcp-wc-subscriptions/extensions.php @@ -2,7 +2,7 @@ /** * The extensions. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); diff --git a/modules/ppcp-subscription/module.php b/modules/ppcp-wc-subscriptions/module.php similarity index 66% rename from modules/ppcp-subscription/module.php rename to modules/ppcp-wc-subscriptions/module.php index 1db299a49..7a66fe031 100644 --- a/modules/ppcp-subscription/module.php +++ b/modules/ppcp-wc-subscriptions/module.php @@ -2,12 +2,12 @@ /** * The module. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface; diff --git a/modules/ppcp-subscription/package.json b/modules/ppcp-wc-subscriptions/package.json similarity index 95% rename from modules/ppcp-subscription/package.json rename to modules/ppcp-wc-subscriptions/package.json index 9fd2f9305..6c1fad0fe 100644 --- a/modules/ppcp-subscription/package.json +++ b/modules/ppcp-wc-subscriptions/package.json @@ -1,5 +1,5 @@ { - "name": "ppcp-subscription", + "name": "ppcp-wc-subscriptions", "version": "1.0.0", "license": "GPL-3.0-or-later", "browserslist": [ diff --git a/modules/ppcp-subscription/resources/js/paypal-subscription.js b/modules/ppcp-wc-subscriptions/resources/js/paypal-subscription.js similarity index 100% rename from modules/ppcp-subscription/resources/js/paypal-subscription.js rename to modules/ppcp-wc-subscriptions/resources/js/paypal-subscription.js diff --git a/modules/ppcp-subscription/services.php b/modules/ppcp-wc-subscriptions/services.php similarity index 93% rename from modules/ppcp-subscription/services.php rename to modules/ppcp-wc-subscriptions/services.php index 8ddad1fe6..469c34d1b 100644 --- a/modules/ppcp-subscription/services.php +++ b/modules/ppcp-wc-subscriptions/services.php @@ -2,14 +2,14 @@ /** * The services * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; diff --git a/modules/ppcp-subscription/src/DeactivatePlanEndpoint.php b/modules/ppcp-wc-subscriptions/src/DeactivatePlanEndpoint.php similarity index 94% rename from modules/ppcp-subscription/src/DeactivatePlanEndpoint.php rename to modules/ppcp-wc-subscriptions/src/DeactivatePlanEndpoint.php index fe10c0638..922a0347b 100644 --- a/modules/ppcp-subscription/src/DeactivatePlanEndpoint.php +++ b/modules/ppcp-wc-subscriptions/src/DeactivatePlanEndpoint.php @@ -2,12 +2,12 @@ /** * The deactivate Subscription Plan Endpoint. * - * @package WooCommerce\PayPalCommerce\OrderTracking\Endpoint + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare( strict_types=1 ); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use Exception; use WC_Product; diff --git a/modules/ppcp-subscription/src/FreeTrialHandlerTrait.php b/modules/ppcp-wc-subscriptions/src/FreeTrialHandlerTrait.php similarity index 95% rename from modules/ppcp-subscription/src/FreeTrialHandlerTrait.php rename to modules/ppcp-wc-subscriptions/src/FreeTrialHandlerTrait.php index d528ff554..f36851781 100644 --- a/modules/ppcp-subscription/src/FreeTrialHandlerTrait.php +++ b/modules/ppcp-wc-subscriptions/src/FreeTrialHandlerTrait.php @@ -2,12 +2,12 @@ /** * Helper trait for the subscriptions handling. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use WC_Order; use WC_Subscriptions_Product; diff --git a/modules/ppcp-subscription/src/Helper/SubscriptionHelper.php b/modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php similarity index 98% rename from modules/ppcp-subscription/src/Helper/SubscriptionHelper.php rename to modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php index 9f803c5c5..049d78296 100644 --- a/modules/ppcp-subscription/src/Helper/SubscriptionHelper.php +++ b/modules/ppcp-wc-subscriptions/src/Helper/SubscriptionHelper.php @@ -4,12 +4,12 @@ * whether the cart contains a subscription, the current product is * a subscription or the subscription plugin is activated in the first place. * - * @package WooCommerce\PayPalCommerce\Subscription\Helper + * @package WooCommerce\PayPalCommerce\WcSubscriptions\Helper */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription\Helper; +namespace WooCommerce\PayPalCommerce\WcSubscriptions\Helper; use WC_Product; use WC_Product_Subscription_Variation; diff --git a/modules/ppcp-subscription/src/RenewalHandler.php b/modules/ppcp-wc-subscriptions/src/RenewalHandler.php similarity index 98% rename from modules/ppcp-subscription/src/RenewalHandler.php rename to modules/ppcp-wc-subscriptions/src/RenewalHandler.php index f4a9a6cbd..78b87cbde 100644 --- a/modules/ppcp-subscription/src/RenewalHandler.php +++ b/modules/ppcp-wc-subscriptions/src/RenewalHandler.php @@ -2,12 +2,12 @@ /** * Handles subscription renewals. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use WC_Subscription; use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint; diff --git a/modules/ppcp-subscription/src/SubscriptionModule.php b/modules/ppcp-wc-subscriptions/src/SubscriptionModule.php similarity index 99% rename from modules/ppcp-subscription/src/SubscriptionModule.php rename to modules/ppcp-wc-subscriptions/src/SubscriptionModule.php index 88f5596a3..73340b652 100644 --- a/modules/ppcp-subscription/src/SubscriptionModule.php +++ b/modules/ppcp-wc-subscriptions/src/SubscriptionModule.php @@ -2,12 +2,12 @@ /** * The subscription module. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use ActionScheduler_Store; use Exception; @@ -27,7 +27,7 @@ use Psr\Log\LoggerInterface; use WC_Order; use WC_Subscription; use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; -use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; +use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository; use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway; use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway; diff --git a/modules/ppcp-subscription/src/SubscriptionsApiHandler.php b/modules/ppcp-wc-subscriptions/src/SubscriptionsApiHandler.php similarity index 98% rename from modules/ppcp-subscription/src/SubscriptionsApiHandler.php rename to modules/ppcp-wc-subscriptions/src/SubscriptionsApiHandler.php index 2d8bb1d7b..b03560d9a 100644 --- a/modules/ppcp-subscription/src/SubscriptionsApiHandler.php +++ b/modules/ppcp-wc-subscriptions/src/SubscriptionsApiHandler.php @@ -2,12 +2,12 @@ /** * The subscription module. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use Psr\Log\LoggerInterface; use WC_Product; diff --git a/modules/ppcp-subscription/src/SubscriptionsHandlerTrait.php b/modules/ppcp-wc-subscriptions/src/SubscriptionsHandlerTrait.php similarity index 78% rename from modules/ppcp-subscription/src/SubscriptionsHandlerTrait.php rename to modules/ppcp-wc-subscriptions/src/SubscriptionsHandlerTrait.php index ae9b35bfb..47140396a 100644 --- a/modules/ppcp-subscription/src/SubscriptionsHandlerTrait.php +++ b/modules/ppcp-wc-subscriptions/src/SubscriptionsHandlerTrait.php @@ -2,12 +2,12 @@ /** * Helper trait for the free trial subscriptions handling. * - * @package WooCommerce\PayPalCommerce\Subscription + * @package WooCommerce\PayPalCommerce\WcSubscriptions */ declare(strict_types=1); -namespace WooCommerce\PayPalCommerce\Subscription; +namespace WooCommerce\PayPalCommerce\WcSubscriptions; use WC_Subscriptions; diff --git a/modules/ppcp-subscription/webpack.config.js b/modules/ppcp-wc-subscriptions/webpack.config.js similarity index 100% rename from modules/ppcp-subscription/webpack.config.js rename to modules/ppcp-wc-subscriptions/webpack.config.js diff --git a/modules/ppcp-subscription/yarn.lock b/modules/ppcp-wc-subscriptions/yarn.lock similarity index 100% rename from modules/ppcp-subscription/yarn.lock rename to modules/ppcp-wc-subscriptions/yarn.lock diff --git a/package.json b/package.json index fe7e61080..91043bdd3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "install:modules:ppcp-wc-gateway": "cd modules/ppcp-wc-gateway && yarn install", "install:modules:ppcp-webhooks": "cd modules/ppcp-webhooks && yarn install", "install:modules:ppcp-order-tracking": "cd modules/ppcp-order-tracking && yarn install", - "install:modules:ppcp-subscription": "cd modules/ppcp-subscription && yarn install", + "install:modules:ppcp-wc-subscriptions": "cd modules/ppcp-wc-subscriptions && yarn install", "install:modules:ppcp-save-payment-methods": "cd modules/ppcp-save-payment-methods && yarn install", "install:modules:ppcp-onboarding": "cd modules/ppcp-onboarding && yarn install", "install:modules:ppcp-compat": "cd modules/ppcp-compat && yarn install", @@ -27,7 +27,7 @@ "build:modules:ppcp-webhooks": "cd modules/ppcp-webhooks && yarn run build", "build:modules:ppcp-order-tracking": "cd modules/ppcp-order-tracking && yarn run build", "build:modules:ppcp-save-payment-methods": "cd modules/ppcp-save-payment-methods && yarn run build", - "build:modules:ppcp-subscription": "cd modules/ppcp-subscription && yarn run build", + "build:modules:ppcp-wc-subscriptions": "cd modules/ppcp-wc-subscriptions && yarn run build", "build:modules:ppcp-onboarding": "cd modules/ppcp-onboarding && yarn run build", "build:modules:ppcp-compat": "cd modules/ppcp-compat && yarn run build", "build:modules:ppcp-uninstall": "cd modules/ppcp-uninstall && yarn run build", @@ -39,7 +39,7 @@ "watch:modules:ppcp-wc-gateway": "cd modules/ppcp-wc-gateway && yarn run watch", "watch:modules:ppcp-webhooks": "cd modules/ppcp-webhooks && yarn run watch", "watch:modules:ppcp-order-tracking": "cd modules/ppcp-order-tracking && yarn run watch", - "watch:modules:ppcp-subscription": "cd modules/ppcp-subscription && yarn run watch", + "watch:modules:ppcp-wc-subscriptions": "cd modules/ppcp-wc-subscriptions && yarn run watch", "watch:modules:ppcp-save-payment-methods": "cd modules/ppcp-save-payment-methods && yarn run watch", "watch:modules:ppcp-onboarding": "cd modules/ppcp-onboarding && yarn run watch", "watch:modules:ppcp-compat": "cd modules/ppcp-compat && yarn run watch",