Commit Graph

3 Commits

Author SHA1 Message Date
Chi-Hsuan Huang c63bb88e0e
Add react-powered main payments settings screen (#50825)
* Fix payment store selector type

* Add changelog

* Add react-powered payment settings main screen

* Add changelog

* Update style

* Revert changes

* Fix enable payment gateway error

* Fix wcpay install busy state

* Check if Nonce exist or not

* Fix extra payment methods

* Fix untranslated texts

* Fix lint
2024-08-27 14:30:01 +08:00
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
Ilyas Foo 33222c20e2
Add reactified main payments screen (#49972)
* Add new payments settings class, add new settings-payments module and a demo main component

* Minor edits

* Changelog

* Lint

* Lint php

* Use createRoot

* Hide payment recommendations when feature flag is enabled

* Moved logic
2024-07-26 12:40:18 +08:00