Per the code comment, we were already explicitly assuming draft posts
are "pending". That's fine and shouldn't block us from setting new posts
to auto-draft.
For some operations in the API, like calculating taxes or shipping, it's
helpful to be able to have an order saved in the database. Having an
order object with an ID lets us perform other API actions on that order.
However, we also don't necessarily want these to show up on certain
screens.
Here we adopt the auto-draft status from core WordPress as a way to save
an order as a discrete object while signalling that it's not ready to
action yet.
Suggestions:
* auto-draft might not make sense given that it's used in core. We might
want to use something like `draft` instead.
* We may want to track this separate set of statuses (trash, auto-draft)
in a more official way, so we don't have to copy/paste around the
codebase.
This method ensures that we can execute tests using a relative path with or without `plugins/woocommerce` and/or `tests/e2e` prepended on the test file path.
Oops. We can't call $this->prepare_objects_query() unconditionally inside
prepare_objects_query(). This was my fault 🙃b43af2ae16
To explicitly reference the parent implementation, we use `parent::`
* 2022 theme stylings for product and shop pages.
* Add support for variable products and gallery.
* Add margin to reset button.
* Add support grouped product.
* Disable breadcrumb and add notice styling child.
* Reduce heading size on title page.
* Reduce font-size for content in tabs.
* Fixes for PR 31536 (#31611)
* Set max width to 1000px for shop and products.
* Display breadcrumbs on product pages.
* Remove admin styles.
* Fix result count and ordering control alignment.
* Fix onsale alignment on single product pages.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Added the status field to the GET Coupon(s) API endpoint
* Updated existing unit test for reading coupons from the db
* Updated tests for version 2&3 when fetching coupons
* Update plugins/woocommerce/includes/data-stores/class-wc-coupon-data-store-cpt.php
Co-authored-by: Josh Betz <j@joshbetz.com>
* Update plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php
Co-authored-by: Josh Betz <j@joshbetz.com>
* Update plugins/woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php
Co-authored-by: Josh Betz <j@joshbetz.com>
* Updated unit test for getters and setters
* Fix indentation
* Fix indentation.
Co-authored-by: Josh Betz <j@joshbetz.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>