Merged
Conversation
* Set up abilities API abstraction layers * Remove unnecessary properties * Implement rest as an example * Add JsonSerializable * Clean up class * Use trait * Simplify schema * Update changelog * Add file headings & improve docblocks * Remove REST references * Clean up unnecessary types * Centralize can use abilities API logic * Add tests * Add more tests * Fix docblock Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Check if class exists --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Release PR for Plugin Framework v6.1.0, primarily adding the new Abilities API abstraction layer (for WP Abilities API registration) and performing the versioned-namespace bump from v6_0_1 to v6_1_0 across the framework (including versioned JS handles/assets and test namespaces).
Changes:
- Introduces Abilities API abstraction layer (DTOs, provider contracts, and a central registration handler wired into
SV_WC_Plugin). - Bumps framework version from 6.0.1 → 6.1.0 across PHP namespaces, JS handler names/events, and package metadata.
- Updates unit/integration tests and loader sample to the new namespace/version.
Reviewed changes
Copilot reviewed 166 out of 175 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| woocommerce/utilities/class-sv-wp-job-batch-handler.php | Namespace bump to v6_1_0. |
| woocommerce/utilities/class-sv-wp-background-job-handler.php | Namespace bump to v6_1_0. |
| woocommerce/utilities/class-sv-wp-async-request.php | Namespace bump to v6_1_0. |
| woocommerce/rest-api/class-sv-wc-plugin-rest-api.php | Namespace bump to v6_1_0. |
| woocommerce/rest-api/Controllers/Settings.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/rest-api/class-sv-wc-payment-gateway-plugin-rest-api.php | Namespace bump to v6_1_0 + updated @see references. |
| woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-token.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/integrations/abstract-sv-wc-payment-gateway-integration.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/exceptions/class-sv-wc-payment-gateway-exception.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway.php | Namespace bump to v6_1_0 + versioned asset handle update. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php | Namespace bump to v6_1_0 + helper FQCN update. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php | Namespace bump to v6_1_0 + versioned asset handles update. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-payment-form.coffee | JS handler class/event renamed to v6_1_0. |
| woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-my-payment-methods.coffee | JS handler class/event renamed to v6_1_0. |
| woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js | JS handler class/event renamed to v6_1_0. |
| woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-apple-pay.coffee | JS handler class/event renamed to v6_1_0. |
| woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-payment-form.js | Built asset updated for v6_1_0 handler/event naming. |
| woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-my-payment-methods.js | Built asset updated for v6_1_0 handler/event naming. |
| woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-google-pay.js | Built asset updated for v6_1_0 handler/event naming. |
| woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-apple-pay.js | Built asset updated for v6_1_0 handler/event naming. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/PaymentFormContextChecker.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/Handlers/Capture.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php | Namespace bump to v6_1_0 + helper FQCN update. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php | Namespace bump to v6_1_0 + versioned asset handles update. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php | Namespace bump to v6_1_0 + response handler FQCN update. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/Orders.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php | Namespace bump to v6_1_0 + helper FQCN update. |
| woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php | Namespace bump to v6_1_0 + versioned asset handles update. |
| woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/Google_Pay/AJAX.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/Frontend.php | Namespace bump to v6_1_0 + versioned style handle update. |
| woocommerce/payment-gateway/External_Checkout/External_Checkout.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/External_Checkout/Admin.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/Dynamic_Props.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/Blocks/Gateway_Checkout_Block_Integration.php | Namespace bump to v6_1_0. |
| woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php | Namespace bump to v6_1_0. |
| woocommerce/i18n/languages/woocommerce-plugin-framework.pot | POT header updates (project info + creation date). |
| woocommerce/compatibility/class-sv-wc-subscription-compatibility.php | Namespace bump to v6_1_0. |
| woocommerce/compatibility/class-sv-wc-order-compatibility.php | Namespace bump to v6_1_0. |
| woocommerce/compatibility/abstract-sv-wc-data-compatibility.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wp-admin-message-handler.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wc-plugin.php | Version bump + integrates Abilities handler initialization. |
| woocommerce/class-sv-wc-plugin-exception.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wc-plugin-dependencies.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wc-plugin-compatibility.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wc-hook-deprecator.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wc-helper.php | Namespace bump to v6_1_0. |
| woocommerce/class-sv-wc-admin-notice-handler.php | Namespace bump to v6_1_0. |
| woocommerce/changelog.txt | Adds v6.1.0 release entry and normalizes earlier placeholder dates. |
| woocommerce/api/interface-sv-wc-api-response.php | Namespace bump to v6_1_0. |
| woocommerce/api/interface-sv-wc-api-request.php | Namespace bump to v6_1_0. |
| woocommerce/api/class-sv-wc-api-exception.php | Namespace bump to v6_1_0. |
| woocommerce/api/class-sv-wc-api-base.php | Namespace bump to v6_1_0. |
| woocommerce/api/abstract-sv-wc-api-xml-response.php | Namespace bump to v6_1_0. |
| woocommerce/api/abstract-sv-wc-api-xml-request.php | Namespace bump to v6_1_0. |
| woocommerce/api/abstract-sv-wc-api-json-response.php | Namespace bump to v6_1_0. |
| woocommerce/api/abstract-sv-wc-api-json-request.php | Namespace bump to v6_1_0. |
| woocommerce/api/Traits/Cacheable_Request_Trait.php | Namespace bump to v6_1_0. |
| woocommerce/api/Abstract_Cacheable_API_Base.php | Namespace bump to v6_1_0. |
| woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php | Namespace bump to v6_1_0. |
| woocommerce/admin/Notes_Helper.php | Namespace bump to v6_1_0. |
| woocommerce/Traits/IsSingletonTrait.php | Namespace bump to v6_1_0. |
| woocommerce/Traits/CanGetNewInstanceTrait.php | Namespace bump to v6_1_0. |
| woocommerce/Traits/CanConvertToArrayTrait.php | Namespace bump to v6_1_0. |
| woocommerce/Settings_API/Setting.php | Namespace bump to v6_1_0. |
| woocommerce/Settings_API/Control.php | Namespace bump to v6_1_0. |
| woocommerce/Settings_API/Abstract_Settings.php | Namespace bump to v6_1_0. |
| woocommerce/Plugin/Lifecycle.php | Namespace bump to v6_1_0. |
| woocommerce/Helpers/ScriptHelper.php | Namespace bump to v6_1_0. |
| woocommerce/Helpers/PageHelper.php | Namespace bump to v6_1_0. |
| woocommerce/Helpers/OrderHelper.php | Namespace bump to v6_1_0. |
| woocommerce/Helpers/NumberHelper.php | Namespace bump to v6_1_0. |
| woocommerce/Helpers/ArrayHelper.php | Namespace bump to v6_1_0. |
| woocommerce/Handlers/Script_Handler.php | Namespace bump to v6_1_0 + JS handler class name versioning updated. |
| woocommerce/Handlers/Country_Helper.php | Namespace bump to v6_1_0. |
| woocommerce/Enums/Traits/EnumTrait.php | Namespace bump to v6_1_0. |
| woocommerce/Enums/PaymentFormContext.php | Namespace bump to v6_1_0. |
| woocommerce/Emails/Traits/HasEmailPreviewValuesTrait.php | Namespace bump to v6_1_0. |
| woocommerce/Blocks/Traits/Block_Integration_Trait.php | Namespace bump to v6_1_0. |
| woocommerce/Blocks/Blocks_Handler.php | Namespace bump to v6_1_0. |
| woocommerce/Blocks/Block_Integration.php | Namespace bump to v6_1_0. |
| woocommerce/Addresses/Customer_Address.php | Namespace bump to v6_1_0. |
| woocommerce/Addresses/Address.php | Namespace bump to v6_1_0. |
| woocommerce/Abilities/DataObjects/AbilityCategory.php | New: Ability category DTO for registration. |
| woocommerce/Abilities/DataObjects/AbilityAnnotations.php | New: DTO for ability behavioral annotations. |
| woocommerce/Abilities/DataObjects/Ability.php | New: Ability DTO and mapping to wp_register_ability() args. |
| woocommerce/Abilities/Contracts/MakesAbilityContract.php | New: Contract for ability factory classes. |
| woocommerce/Abilities/Contracts/JsonSerializable.php | New: Framework-level JsonSerializable + schema contract. |
| woocommerce/Abilities/Contracts/HasAbilitiesContract.php | New: Plugin contract for providing abilities provider. |
| woocommerce/Abilities/Contracts/AbilitiesProviderContract.php | New: Contract for abilities/categories provider. |
| woocommerce/Abilities/AbstractAbilitiesProvider.php | New: Base provider implementation to build abilities/categories. |
| woocommerce/Abilities/AbilitiesHandler.php | New: Central Abilities API registration handler. |
| woocommerce-framework-plugin-loader-sample.php | Framework version constant bumped to 6.1.0. |
| tests/unit/Traits/IsSingletonTraitTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Traits/CanGetNewInstanceTraitTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Traits/CanConvertToArrayTraitTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Settings_API/SettingTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Settings_API/ControlTest.php | Test namespace bump to v6_1_0. |
| tests/unit/PluginTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Payment_Gateway/PaymentFormContextCheckerTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Payment_Gateway/External_Checkout/Google_Pay/GooglePayTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Payment_Gateway/External_Checkout/Google_Pay/FrontendTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Payment_Gateway/External_Checkout/Google_Pay/AdminTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Helpers/PageHelperTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Helpers/NumberHelperTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Helpers/CountryHelperTest.php | Test namespace bump to v6_1_0. |
| tests/unit/Helpers/ArrayHelperTest.php | Test namespace bump to v6_1_0. |
| tests/unit/HelperTest.php | Test namespace bump to v6_1_0. |
| tests/unit/AutoloadingTest.php | Test namespace bump to v6_1_0 + alias expectations updated. |
| tests/unit/API/CacheableRequestTraitTest.php | Test namespace bump to v6_1_0. |
| tests/integration/payment-gateway/apple-pay/ApplePayFrontendTest.php | Integration test updated for v6_1_0 JS loaded event name. |
| tests/integration/payment-gateway/SV_WC_Payment_Gateway_Payment_Tokens_Handler_Test.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/payment-gateway/SV_WC_Payment_Gateway_Payment_Token_Test.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/payment-gateway/PaymentFormTest.php | Integration test updated for v6_1_0 JS loaded event name. |
| tests/integration/payment-gateway/MyPaymentMethodsTest.php | Integration test updated for v6_1_0 JS loaded event name. |
| tests/integration/payment-gateway/GatewayPluginTest.php | Integration test @see reference updated to v6_1_0. |
| tests/integration/Settings_API/SettingTest.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/Settings_API/AbstractSettingsTest.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/SV_WC_Payment_Gateway_Helper_Test.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/REST_API/RESTAPITest.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/REST_API/Controllers/SettingsTest.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/PluginTest.php | Integration test @see and class assertions updated to v6_1_0. |
| tests/integration/HelperTest.php | Integration test namespace import updated to v6_1_0. |
| tests/integration/DependenciesTest.php | Integration test @see references updated to v6_1_0. |
| tests/integration/API/CacheableAPIBaseTest.php | Integration test namespace import updated to v6_1_0. |
| tests/_support/plugins/test-plugin/includes/Plugin.php | Test plugin updated to import v6_1_0. |
| tests/_support/plugins/test-plugin/includes/Gateway.php | Test plugin updated to import v6_1_0. |
| tests/_support/plugins/test-plugin/includes/API.php | Test plugin updated to import v6_1_0. |
| tests/_support/plugins/gateway-test-plugin/includes/Plugin.php | Test plugin updated to import v6_1_0. |
| tests/_support/plugins/gateway-test-plugin/includes/Gateway.php | Test plugin updated to import v6_1_0. |
| tests/_support/plugins/gateway-test-plugin/includes/API.php | Test plugin updated to import v6_1_0. |
| tests/TestCase.php | Test base namespace bumped to v6_1_0. |
| tests/unit/Abilities/DataObjects/AbilityTest.php | New: Unit tests for Ability DTO mapping. |
| tests/unit/Abilities/DataObjects/AbilityCategoryTest.php | New: Unit tests for AbilityCategory DTO mapping. |
| tests/unit/Abilities/DataObjects/AbilityAnnotationsTest.php | New: Unit tests for AbilityAnnotations DTO mapping. |
| tests/unit/Abilities/AbstractAbilitiesProviderTest.php | New: Unit tests for AbstractAbilitiesProvider behavior. |
| tests/unit/Abilities/AbilitiesHandlerTest.php | New: Unit tests for AbilitiesHandler hook/registration behavior. |
| package.json | Package version bumped to 6.1.0. |
| package-lock.json | Lockfile version bump to 6.1.0 (and regenerated metadata). |
| composer.json | Composer package version bumped to 6.1.0 + PSR-4 namespace updated to v6_1_0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Includes abilities API abstraction layers.
Stories
Details
Additional details to expand on the summary, if needed
Resources
List of related issues, pull requests, external pages, etc
Before merge
woocommerce/changelog.txt