Session handler: restore use of _table property, for consistency with other methods. #44517
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.
Submission Review Guidelines:
Changes proposed in this Pull Request:
WC_Session_Handler
uses its_table
property to store a reference to thewoocommerce_sessions
database table.At one point, all methods within the class used this property to refer to the table, and that meant subclasses could change the target database table quite easily. This was apparently broken by mistake in #21455, which hard-coded the table name within one method.
This change restores the use of
_table
across the class. Functionally, nothing actually changes: it just makes it easier for third parties to implement certain types of customization (and also makes things more consistent than previously).I did not add a unit test, because the class depends on the cookies superglobal and it felt cleaner to infer it is operating successfully via our existing battery of storefront, cart and checkout E2E tests.
Closes #28193.
How to test the changes in this Pull Request:
You should experience the same behavior with or without this change (we are verifying nothing has changed or broken, rather than looking for a difference):
Changelog entry
Significance
Type
Message
Comment