-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Feb 14, 2024
1 parent
8f5b469
commit 9527fb3
Showing
19 changed files
with
19,667 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
WooCommerce Blocks integration | ||
============================== | ||
|
||
This project provides the functionality needed for integrating the payment methods provided | ||
by PostFinance Checkout with the WooCommerce Blocks. | ||
|
||
See [this documentation](https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce-blocks/docs/) for more information about the integration process. | ||
|
||
This project integrates to the checkout block, provided by WooCommerce Blocks, in 2 separate ways: | ||
- iFrame: The payment method form is displayed in an iFrame rendered in the checkout form directly. | ||
- Ligthbox: The payment method form is displayed in a lightbox, renderd on top of the checkout form. | ||
|
||
The woocommerce shop's admin is able to select the integration mode from the settings of this plugin | ||
in the backend. | ||
|
||
Project layout | ||
============== | ||
This project consists in the following files: | ||
|
||
- blocks | ||
- build: this folder contains the project built and minimized. | ||
- index.asset.php: this file is used by the WP Javascrit builder for controlling the version of the project | ||
- index.js: the project properly built and minimized, ready to be served in the checkout form. | ||
- node_modules: Dependencies for building the project | ||
- src | ||
- iframe-component | ||
- index.js: Logic for generating the iframe from the portal | ||
- lightbox-component | ||
- index.js: Logic for displaying the Lightbox provided by the portal | ||
- package-lock.json: control for project's build dependencies | ||
- package.json: project's definition as expected by wp-scripts. | ||
- README.md: this file | ||
- webpack.config.js: webpack's configuration for building the project (https://developer.woo.com/2020/11/13/tutorial-adding-react-support-to-a-woocommerce-extension/) | ||
|
||
|
||
How to modify this project | ||
========================== | ||
|
||
If you need to modify the source code of this project, you need to build the project. Everything needed is already configured in the package.json file. | ||
If you have not done it before, you need to fist install the dependencies needed by the project by running: | ||
|
||
`npm install` | ||
|
||
After you have saved your changes, build the project by running: | ||
`npm run build` | ||
|
||
The build folder will update with the new version of the project. The next request to the build/index.js file will contain your changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php return array('dependencies' => array('@woocommerce/blocks-registry', 'react', 'wp-polyfill'), 'version' => '78fcd801e94ec69893e5'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.