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
50 stars 15 forks source link

Fix new section in payments tab not working #332

Closed ghost closed 2 years ago

ghost commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

Change the logic in the class-wc-settings-payment-gateways.php file so that new sections created under the Payments tab will work correctly. This was an existing bug in WC 3.5.3 that was later fixed with this PR: https://github.com/woocommerce/woocommerce/pull/22988

How to test the changes in this Pull Request:

  1. Copy the revised class-wc-settings-payment-gateways.php file to a test installation
  2. Create a new section following this tutorial: https://docs.woocommerce.com/document/adding-a-section-to-a-settings-tab/
    • make sure you use the woocommerce_get_sections_checkout filter.
  3. Visit the Payments tab in the setting and ensure that the new section is showing and the screen displays correctly when clicked.

Screenshot - before:

payments0

Screenshot - after:

payments2

Other information:

Discussion on forum is here: https://forums.classicpress.net/t/classiccommerce-not-triggering-filter-for-adding-settings-sections-in-tabs/3508

Thanks to arnandegans for bringing it to our attention.

ClassyBot commented 2 years ago

This pull request has been mentioned on ClassicPress Forums. There might be relevant details there:

https://forums.classicpress.net/t/classiccommerce-not-triggering-filter-for-adding-settings-sections-in-tabs/3508/15

bahiirwa commented 2 years ago

Thanks for raising this @simplycomputing. The solution made is solid.

Adding these for the sake of the history: https://github.com/woocommerce/woocommerce/commit/2abf39c6ae21b1be8b0fc3c40a81e3b95799c373 https://github.com/woocommerce/woocommerce/commit/0211757e47510c9de679bb12738fee5751e8c482