duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/simple-commerce
Other
143 stars 34 forks source link

[6.x] Reference gateways & shipping methods by handles #968

Closed duncanmcclean closed 6 months ago

duncanmcclean commented 6 months ago

This pull request makes some necessary changes to the way Gateways & Shipping Methods are stored in order data.

Previously, the fully qualified class name was saved to the order's YAML:

shipping_method: DoubleThreeDigital\SimpleCommerce\Shipping\FreeShipping

However, with this PR, gateways & shipping methods are now references by their "handles":

shipping_method: free_shipping

References in orders will be automatically updated upon updating.

These changes were necessary as part of the change in namespace from DoubleThreeDigital to DuncanMcClean which is due to happen in the v6 release.

This PR is a draft for now since there's a couple of rough edges I want to iron out before merging.

To Do

github-actions[bot] commented 5 months ago

Released as part of v6.0.0.