* Ensure stock change notifs only fire when necessary
In #49583 we changed when the actions that trigger stock change
notifications fire, to decouple them from order creation. However, it
turns out what during product creation, the stock quantity update
routines still run even when no stock is being set and even when the
"manage stock" setting is set to false. Rather than try to untangle the
web of why this happens (and potentially break other things in the
process), this simply adds a check for the "manage stock" setting prior
to firing the notif actions, and bail early if the product does not have
managed stock.
It also adds a unit test, which is really more of an integration test,
to ensure this behavior.
Fixes#50958
* Remove irrelevant doc block info
In #49583 we added a second parameter to the
`woocommerce_variation_set_stock` and `woocommerce_product_set_stock`
action hooks, but it was later removed. However, we didn't remove the
corresponding doc block info.
* Add changelog file
---------
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
* Remove filter margins in the editor
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Remove small space after + sign
---------
Co-authored-by: github-actions <github-actions@github.com>
* Align Cart and My Account icons to the right in the Essential Header pattern
* Align navigation icon to the right in the Minimal Header pattern
* Add changelog file
* Don't initialize the block template compatibility classes in classic themes
* Conditionally initialize the block template compatibility classes when the template is being rendered
* Add changelog file
* Remove unnecessary blank line
* Conditionally initialize the block template compatibility classes when the template is being rendered (II)
* Change cursor style of preview button to default
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Hover and active state shouldn't change background color of the preview button.
* Remove use of wp-block-woocommerce-product-collection class
---------
Co-authored-by: github-actions <github-actions@github.com>
* fixes not allowed size parameter for any input types, which do not allow them
* add changelog
* Update plugins/woocommerce/templates/global/quantity-input.php
* Appease linter
---------
Co-authored-by: Lukas Kurzmann <lukas.kurzmann@sunlime.at>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
* Wait for cart response after applying coupons
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* trigger CI
* Delete plugins/woocommerce/changelog/50995-fix-flaky—cart—oupon-test-50928
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip - number of introductory patterns not same on Pressable
* Skip - "Want more patterns?" is always present, skipping for now
* Skip - it activates theme through CLI, don't work for Pressable
* Include /customize-store folder for Pressable execution
* Update month formatting
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
* Not show reviews in the frontend when they are disabled at store or product level
* Add tests for single product template
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix typo
---------
Co-authored-by: github-actions <github-actions@github.com>
* Restore changes from 48709
* Update the PluginUtil method and related unit test
* Update API endpoint, fix schemas
* Improve unit tests for API controllers
* Fake woopayments gateway is_account_partially_onboarded return false
* Refactor WooCommercePayments class to use get_woo_payments_gateway() function
* Add changefile(s) from automation for the following project(s): woocommerce-beta-tester, woocommerce
* Remove changelog
* Add unit tests
* Update changelog
---------
Co-authored-by: github-actions <github-actions@github.com>
* Skip `Introduction can be dismissed`
* This part is already covered in `Introduction can be dismissed`
* Skip Analytics-related tests since there are already some numbers on Pressable website
* Include admin related tests into default-pressable test suite
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
* Include add-variable-product/**/*.spec.js for Pressable env
* Use unique identifier for the Update button
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove @local tag
* Use getBy* instead of locator
* Use `locator( '#publishing-action' )`
* Fix lint issues
---------
Co-authored-by: github-actions <github-actions@github.com>
* Include products/block-editor into default-pressable set of tests
* Wait for `Block: Product attributes` before proceeding
* Add changefile(s) from automation for the following project(s): woocommerce
* Put comment on why to wait for the element
* Fix issue caught by Lint - @woocommerce/plugin-woocommerce
* Fix linting error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Move register product collection tester e2e tests from product collection file to its own file
* Add changelog file
* Remove the unstable allTextContents usage
* Remove page.waitForTimeout because it doesn't validate that the button is hidden after exactly 1 second
* Remove page.waitForTimeout from 'Should display properly in Product Catalog template' e2e test
* Let's use one parent describe per file for good practice
* Keeping the structure flat
* Disable woocommerce_calc_taxes before tests start
* TEMP: Comment on expect `#setting-error-settings_updated`
* Include activate-and-setup folder into test runs for external envs
* Update core-profiler.spec.js so it's passing on Pressable and WPCOM
* Check only active plugins
* "Total sales" is missing on one of the external sites. Trying without it.
* Remove comments
* Revert to use `#submit` locator
* Revert "#setting-error-settings_updated"
* Revert "I’m just starting my business" string - check `'` sign on CI
* Revert all strings that initially contained `'` sign
* Revert "Revert "#setting-error-settings_updated""
This reverts commit ae6b72b5c4.
* Revert "Revert "I’m just starting my business" string - check `'` sign on CI"
This reverts commit e852707e06.
* Revert "Revert all strings that initially contained `'` sign"
This reverts commit f978595303.
* Reload page and check settings state instead of verifying `#setting-error-settings_updated`
* Ensure the store is not in "Coming soon" mode before basic.spec.js
* Check if store is in "Comin soon" mode - `hasText` instead of `name`
* Remove `grepInvert: /@local/`
* WPCOM - run only `basic.spec.js`
* WPCOM - run only `basic.spec.js`
* Revert default-wpcpom/playwright.config.js
* Add changefile(s) from automation for the following project(s): woocommerce
* Introduce @skip-on-default-pressable and skip `Can connect to WooCommerce.com`
* Revert "Introduce @skip-on-default-pressable and skip `Can connect to WooCommerce.com`"
This reverts commit e38abebdd2.
* Re-enable "Go to WC Home and make sure the total sales is visible"
* Introduce @skip-on-default-pressable and skip `core-profiler.spec.js`
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix site visibility badge style
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update Block References doc
* Move the Block References to public Docs
* Change the place Block Reference is generated to
* Add changelog
* Update docs manifest file
* Update manifest
* Ensure WC's customer and cart props are initialized
If the customer or cart property of the main WooCommerce class is
accessed before the `woocommerce_init` action has fired, those
properties will be `null` instead of containing their respective
classes, which can cause a fatal error if you then try to access a
method on one of the classes. This makes sure the props will always
return a class.
Fixes#50245
* Revert "Ensure WC's customer and cart props are initialized"
This approach unexpectedly breaks a lot of things...
This reverts commit 310fd2c118.
* Alternate solution
The attempt to fix the problem wholistically ended up causing a lot of
things to break, so this is the band-aid approach instead.
* Add changelog file
* Remove unnecessary assignment to global POST var
This was polluting the results of the new test, causing it to fail.