Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
86 stars 32 forks source link

Update and deprecate the cache managers to no longer refer to CPT or post APIs #340

Open james-allan opened 1 year ago

james-allan commented 1 year ago

Describe the bug

In https://github.com/Automattic/woocommerce-subscriptions-core/pull/304 we've introduced new cache managers that work with CRUD objects rather than post APIs, however because of class inheritance structures a lot of post related names have seeped into the new CRUD and HPOS compatible classes.

For this issue we should deprecate where necessary and update our inline comments, function and variable naming conventions to move away from post and postmeta nomenclature and refer to them as generic as some of them are no longer CPT specific and have been updated to work with CRUD objects instead.

Classes that should update:

Expected behavior

These classes operated on CPT objects in the past, however because we've updated them to be compatible with HPOS environments their naming conventions no longer make sense. They should be updated to not confuse folks when using or developing on them.