You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WooCommerce Subscriptions currently goes against this policy suggestion and extends some of these datastore classes. This has the following reprecussions:
As a WooCommerce official extension, it provides the community of the developers that look at these extensions for patterns on how they should integrate into and extend WooCommerce with an example that is contrary to the suggested practice.
It isn't forward compatible. If WooCommerce core needs to change the underlying behavior of the datastores, we can't have any confidence that these extended classes will still work as expected. The ovewritten protected methods may no longer get called or, worse, have the a changed signature causing a fatal error.
Dev notes
If a custom datastores are needed, we should consider wrapping the internal datastore instance and delegating to it for any direct storage manipulation that it normally manages, e.g. DB and cache.
I also believe it is possible that a custom datastore for WooCommerce subscriptions isn't needed at all, but there are currently things in the datastores that are probably better suited to be managed by the data object classes themselves. Either way, making this change will likely require making updates to WooCommerce core to accomodate the needs.
The text was updated successfully, but these errors were encountered:
Description
As noted in https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce/src/Internal#the-internal-namespace, the Internal namespace of WooCommerce core is intended to be internal only and provides no guarantee that the interfaces within it will not change.
WooCommerce Subscriptions currently goes against this policy suggestion and extends some of these datastore classes. This has the following reprecussions:
Dev notes
If a custom datastores are needed, we should consider wrapping the internal datastore instance and delegating to it for any direct storage manipulation that it normally manages, e.g. DB and cache.
I also believe it is possible that a custom datastore for WooCommerce subscriptions isn't needed at all, but there are currently things in the datastores that are probably better suited to be managed by the data object classes themselves. Either way, making this change will likely require making updates to WooCommerce core to accomodate the needs.
The text was updated successfully, but these errors were encountered: