ClassicPress / classic-commerce

A simple but powerful e-commerce platform built for ClassicPress. Forked from WooCommerce and compatible with many Woo extensions.
https://classiccommerce.cc/
GNU General Public License v3.0
52 stars 15 forks source link

fix issue 324 #326

Closed magenta-cuda closed 3 years ago

magenta-cuda commented 3 years ago

All Submissions:

Changes proposed in this Pull Request:

Closes #324.

How to test the changes in this Pull Request:

1. 2. 3.

Screenshot - before:

Screenshot - after:

Other information:

magenta-cuda commented 3 years ago

@nylen

I don't think this change should be submitted to WooCommerce because:

This is a dependency injection problem and can be solved using a dependency injection container. As WooCommerce is starting to use PSR11 dependency injection containers WooCommerce may solve this problem using a dependency injection container. Of course this would not be backward compatible but WooCommerce has certainly been willing to break backward compatibility. The change proposed here is completely backwards compatible but not consistent with the current state of the art which I believe WooCommerce is moving to.