Merged
Conversation
…$order object (#786) * Add Dynamic_Props class to store dynamic properties for order object. * Replace dynamic props usage with Dynamic_Props class. * Minor doc updates. * Docs improvements. * Update namespace to use v6_0_0 * Added "sv_wc_plugin_framework_use_dynamic_props_class" filter to make use of Dynamic_Props class opt-in only. * Add OrderHelper Class to simplify property get/set on order object. * Update OrderHelper methods to follow the WP case.
This was referenced Sep 25, 2025
Closed
* Explicitly mark parameters as nullable * Update changelog
Contributor
There was a problem hiding this comment.
Pull Request Overview
This is a major version release (v6.0.0) that introduces a significant architectural change to how dynamic properties are handled on WooCommerce order objects. The primary purpose is to address deprecated dynamic property usage in PHP 8.2+ while maintaining backward compatibility with older PHP versions.
Key Changes
- Introduces new
Dynamic_Propsclass for managing order properties with WeakMap (PHP 8.0+) and fallback to direct property access (PHP 7.4+) - Adds new
OrderHelperclass providing standardized methods for getting/setting order properties - Updates all framework classes from namespace
v5_15_12tov6_0_0
Reviewed Changes
Copilot reviewed 151 out of 160 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| woocommerce/payment-gateway/Dynamic_Props.php | New class for PHP 8.2+ compatible dynamic property storage |
| woocommerce/Helpers/OrderHelper.php | New helper class for standardized order property management |
| woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php | Updates to use new OrderHelper and Dynamic_Props classes |
| woocommerce/payment-gateway/integrations/* | Payment gateway integration classes updated for new property handling |
| woocommerce/payment-gateway/class-sv-wc-payment-gateway*.php | Core gateway classes updated to use Dynamic_Props |
| Various framework files | Namespace updates from v5_15_12 to v6_0_0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* Use modern default flags for htmlspecialchars(). * Remove mixed type declarations for PHP 7.4 compat. * Explicitly mark parameters as nullable. * Ignore conditional use of WeakMap.
Merged
2 tasks
Contributor
|
@agibson-godaddy Is there an ETA for the release of 6.0.0? |
Contributor
|
@peterwilsoncc I'll try to get it out Monday Dec 1st. Sorry for the delay -- we've been busy with other projects. |
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
Major release v6.0.0
Stories
Before merge
woocommerce/changelog.txt