Commit Graph

1 Commits

Author SHA1 Message Date
RJ 68cdc2941c
add: render react placeholders for offline and woocommerce_payments settings sections (#50008)
* Added a whitelist of sections to render an alternative output in the WC_Settings_Payment_Gateways_React class.

* Renamed constant and updated its contents to only include 'offline'

* Added a branch in the `output()` method to output an appropriate div with an id if the current section is in the whitelist.

* Added "experimental" prefix to payment settings div ID.

* Replicated the render for the offline section similar to the main payments settings.

* Added a new settings-payments-offline screen to the WooCommerce admin plugin.

* Implemented new offline settings page component.

* Removed the ErrorBoundary components from the SettingsPaymentsMainWrapper and SettingsPaymentsOfflineWrapper.

* Added a new SettingsPaymentsOfflineWrapper component and its corresponding SCSS styles.

* Implemented the WooCommerce Payments section in the settings page.

* Removed WooCommerce Payments settings logic and replaced with a placeholder.

* Added a placeholder for the offline payments screen.

* Added 'main' to the REACTIFY_RENDER_SECTIONS array and refactored the output method to improve readability and maintainability.

* Renamed `render_gateway_section` method to `render_classic_gateway_settings_page` in the `class-wc-settings-payment-gateways-react.php` file.

* Added a filter for the REACTIFY_RENDER_SECTIONS so that plugins can modify this list.

* Added inline documentation for the filter in the `get_reactify_render_sections` method.

* changelog

* Matched the CSS styles for the WooCommerce Payments section to the offline section.

* Removed unnecessary Card component and placeholder text from WooCommerce Payments settings.

* Linted the `class-wc-settings-payment-gateways-react.php` file, addressing the reported linting issues.

* Refactored the payment settings UI to use React components and lazy loading.

* lint

* Nit: Removed unnecessary comment and moved a small code

* Update name to experimental

* Fix save button missing from section pages

* Fix saving sections

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-26 20:55:19 +08:00