Master to Trunk

Claudio Sanches 2021-02-25 21:09:09 -03:00
parent 98d91e5278
commit 1fd96c7f84
12 changed files with 16 additions and 16 deletions

@ -223,9 +223,9 @@ Full documentation for every command is available using `--help`. Below are some
All the examples below use user ID 1 (usually an admin account), but you should replace that with your own user account.
You can also find other examples (without output) by looking at the testing files for our CLI tests: https://github.com/woocommerce/woocommerce/tree/master/tests/cli/features
You can also find other examples (without output) by looking at the testing files for our CLI tests: https://github.com/woocommerce/woocommerce/tree/trunk/tests/cli/features
Each command will have a `.feature` file. Here are some payment gateway commands, for example: https://github.com/woocommerce/woocommerce/blob/master/tests/cli/features/payment_gateway.feature.
Each command will have a `.feature` file. Here are some payment gateway commands, for example: https://github.com/woocommerce/woocommerce/blob/trunk/tests/cli/features/payment_gateway.feature.
#### Command:

@ -41,11 +41,11 @@ The data store handles the actual saving/reading from the database - the object
The `WC_Data` class is the basic implementation for CRUD objects - they should extend this.
https://github.com/woocommerce/woocommerce/blob/master/includes/abstracts/abstract-wc-data.php
https://github.com/woocommerce/woocommerce/blob/trunk/includes/abstracts/abstract-wc-data.php
The most important parts to note; `$data` is an array of props supported in each object, and `$id` is the object's ID.
[The coupon object class](https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-coupon.php) is a good example of extending WC_Data and adding CRUD functions to all properties.
[The coupon object class](https://github.com/woocommerce/woocommerce/blob/trunk/includes/class-wc-coupon.php) is a good example of extending WC_Data and adding CRUD functions to all properties.
### Data

@ -289,7 +289,7 @@ If your extension introduces a new database table, new custom post type, or some
Your data store should still implement `WC_Object_Data_Store_Interface` and provide the normal CRUD functions. Your data store should be the main point of entry for interacting with your data, so any other queries or operations should also have methods.
The [shipping zone data store](https://github.com/woocommerce/woocommerce/blob/master/includes/data-stores/class-wc-shipping-zone-data-store.php) serves as a good example for a "simple" data store using a custom table. The coupons code is a good example for a data store using a custom post type.
The [shipping zone data store](https://github.com/woocommerce/woocommerce/blob/trunk/includes/data-stores/class-wc-shipping-zone-data-store.php) serves as a good example for a "simple" data store using a custom table. The coupons code is a good example for a data store using a custom post type.
All you need to do to register your data store is add it to the `woocommerce_data_stores` filter:

@ -321,4 +321,4 @@ The following tables are installed with WooCommerce. Please note, each table nam
| `expires` | `datetime` | | | `0000-00-00 00:00:00` | |
## Source File
The database scheme is defined in [`includes/class-wc-install.php`](https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-install.php)
The database scheme is defined in [`includes/class-wc-install.php`](https://github.com/woocommerce/woocommerce/blob/trunk/includes/class-wc-install.php)

@ -44,7 +44,7 @@ With this in mind:
When a new version is added:
* The old version is moved under a version-based directory so it can still be accessed. For example, [see v1 here](https://github.com/woocommerce/woocommerce/tree/master/includes/api/v1).
* The old version is moved under a version-based directory so it can still be accessed. For example, [see v1 here](https://github.com/woocommerce/woocommerce/tree/trunk/includes/api/v1).
* A new set of API docs are generated and the old ones are kept accessible.
## Adding new endpoints

@ -1 +1 @@
Please refer to the [new e2e testing documentation](https://github.com/woocommerce/woocommerce/blob/master/tests/e2e/README.md).
Please refer to the [new e2e testing documentation](https://github.com/woocommerce/woocommerce/blob/trunk/tests/e2e/README.md).

@ -1,4 +1,4 @@
[[https://github.com/woocommerce/woocommerce/blob/master/.github/wiki.png|alt=WooCommerce WIKI]]
[[https://github.com/woocommerce/woocommerce/blob/trunk/.github/wiki.png|alt=WooCommerce WIKI]]
Howdy! The WooCommerce Wiki is where we place our **developer focused documentation** for the **core WooCommerce project**. See the links on the right side of the page to navigate!
@ -11,4 +11,4 @@ You may also be interested in referencing the following resources:
| **[Internal API Documentation](https://docs.woocommerce.com/wc-apidocs/index.html)** | Automagically generated from our source code. |
| **[End-user Documentation](https://docs.woocommerce.com/)** | Docs for users, including documentation for extensions. |
| **[The Development Blog](https://woocommerce.wordpress.com)** | Where we post about new features and work we're doing on core. |
| **[How to contribute](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md)** | How to contribute to WooCommerce core. |
| **[How to contribute](https://github.com/woocommerce/woocommerce/blob/trunk/.github/CONTRIBUTING.md)** | How to contribute to WooCommerce core. |

@ -101,6 +101,6 @@ While developing, we recommend adding support to your editor for the following (
## Additional resources
1. [Running unit tests](https://github.com/woocommerce/woocommerce/blob/master/tests/README.md)
1. [Running unit tests](https://github.com/woocommerce/woocommerce/blob/trunk/tests/README.md)
2. [Running e2e tests](End-to-end-Testing)
3. [Extra VVV configurations](Extra-VVV-Configurations)

@ -47,7 +47,7 @@ For sites that are upgrading to 4.3 from a prior version of WooCommerce, the hom
To complete this step, you will need to have a site that is already setup running WooCommerce 4.2, and you need to do the following items to "establish" the store as up and running:
1. Install WooCommerce 4.2.
2. Go through the onboarding wizard, and setup at least one product manually. These actions will install the Woo pages, and have at least one product setup [which is what WooCommerce uses to determine if a store is new or not](https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-install.php#L388).
2. Go through the onboarding wizard, and setup at least one product manually. These actions will install the Woo pages, and have at least one product setup [which is what WooCommerce uses to determine if a store is new or not](https://github.com/woocommerce/woocommerce/blob/trunk/includes/class-wc-install.php#L388).
3. On your WooCommerce 4.2 install, click on the WooCommerce menu item, note that it displays the **Analytics Dashboard**:
![](https://cldup.com/YpTnTa_UpC-3000x3000.png)

@ -39,7 +39,7 @@ WC()->queue()-add( 'my_job_action', array( 'param1' => 'Param 1 value', 'param2'
`WC()->queue->schedule_cron( $timestamp, $cron_schedule, $hook, $args = array(), $group = '' )` - You will use this method to schedule a job to run on a cron-like schedule starting on or after the timestamp provided in `$timestamp` and executing based on the [cron schedule](https://en.wikipedia.org/wiki/Cron) provided in $cron_schedule. You pass the hook that needs to be executed as `$hook`, any arguments you want to use inside that hook in `$args` and if you specify a group name in `$group` it will run the job as part of a group.
## Extending WC_Queue with your own queue system
WC_Queue is fully extendable via the [WC_Queue_Interface](https://github.com/woocommerce/woocommerce/blob/master/includes/interfaces/class-wc-queue-interface.php) interface. Your class needs to implement all those methods as defined in the interface and then you can add the functionality inside those methods to reference an external queue API for example.
WC_Queue is fully extendable via the [WC_Queue_Interface](https://github.com/woocommerce/woocommerce/blob/trunk/includes/interfaces/class-wc-queue-interface.php) interface. Your class needs to implement all those methods as defined in the interface and then you can add the functionality inside those methods to reference an external queue API for example.
In order for WooCommerce to use your queue class you will need to hook into the `woocommerce_queue_class` filter and pass the class name of your queue class to make it use that.

@ -13,9 +13,9 @@ For core development, we use the following structure and flow.
## Branches
* **Master** is the branch for all development and should always be the target of pull requests.
* **Trunk** is the branch for all development and should always be the target of pull requests.
* Each major or minor release has a release branch e.g. `release/3.0` or `release/3.2`. There are no release branches for patch releases.
* Fixes are applied to master, and then **cherry picked into the release branch if needed**.
* Fixes are applied to trunk, and then **cherry picked into the release branch if needed**.
* Features that are not for the next release (for major, when next is minor) get labelled 'major' and are left as PRs. They can be approved however.
* Tags get created from release branches when ready to deploy.

@ -251,7 +251,7 @@ public function set_last4( $last4 ) {
}
```
That's it! These meta functions are provided by [WC_Data](https://github.com/woothemes/woocommerce/blob/master/includes/abstracts/abstract-wc-data.php).
That's it! These meta functions are provided by [WC_Data](https://github.com/woothemes/woocommerce/blob/trunk/includes/abstracts/abstract-wc-data.php).
#### Step 3: Use Your New Token Type