* Initial commit for create-product-editor-block
* Changelog
* Add stylelint support
* Install WooCommerce and WooCommerce Beta Tester in wp-env
* Set PHP and WordPress versions
* Enable product block editor after wp-env setup
* Lower priority for modifying template, so that the template is actual there!
* Update wp-env afterSetup command to use npx
* Update output README.md
* Update README for package
* Use long form of template parm name in README
* Remove unused example in block config
* Update block registration to handle both WP 6.2 and WP 6.3
* Include note about how to change version of WP and WC in README
* Update WP to 6.2.1
* Remove explicit enqueuing of block script and style
* Update minimum required versions of WordPress and PHP in generated plugin file
* Enable feature flag option after setup of wp-env
* Add minimum required WC version to generated plugin file
* Support wp-env lifecycleScripts
* Guard against product_block_editor not enabled or missing template
* Update lock file
* Filter by date_paid and date_completed on list table orders based on configuration
* Use separate query param 'order_date_type' to filter orders
* Add clarifying comment
* Add missing phpcs ignore
* Refactor to use 'm' and 'order_date_type' query parameters
When WC is provided only the country for the option `woocommerce_default_country` then it will fail to select a default state within the listed states.
Try this by manually setting `woocommerce_default_country` to "US" and you will see it selects the first country in the list instead of the first state within that country.
This only happens for countries that have states like US and CA for instance.
This ensures that the instance of the page controller class that
is used to set up the HPOS order admin screens is accessible and has
all its properties set correctly for use with the new is_order_screen
method.
* Make `ready` call jQuery 3 valid
* Another call during setup.
* Add changelog.
* Trigger CI
---------
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* Add lint-branch.sh
* Add doc block and make var name more explicit
* Add changelog file
* Update composer's lint and lint-staged scripts
It turns out that using single brackets for a test doesn't work
sometimes when the variable contains spaces or multiple items.
Double brackets handles this better, so should make the scripts more
robust.
* Use double brackets in lint-branch script
Using double brackets for a test is more robust and may be able to
handle some cases that single brackets can't, such as a variable that
contains spaces or multiple items.
Note that this also required updating the shebang at the top of the
script file from `sh` to `bash` since double brackets is a syntax
introduced in Bash.
This PR adds support to HPOS for order edit locking in the admin (similar to what posts and custom post types get by default). Specifically, the following is implemented:
* The lock is stored in order meta for interoperability with WP's implementation.
* Orders that are being edited by a user other than the current one will appear with a lock icon next to them in the list table. This lock icon/status is updated live via heartbeat with no page refresh necessary.
* When opening an order that is being edited by another user, a warning will be displayed, with the ability to take over the order:
* When someone has taken over an order you're editing, you'll get a warning about it automatically via heartbeat (no page refresh involved)
Fixes#37108