Commit Graph

38374 Commits

Author SHA1 Message Date
Nestor Soriano 94f5dfaa11
Make the DataRegenerator::delete_all_attributes_lookup_data method public. 2021-04-28 16:56:29 +02:00
Nestor Soriano 21053afec1
Partially implement LookupDataStore::update_data_for_product
For now it only creates data for non-variable products.
2021-04-28 12:25:56 +02:00
Nestor Soriano d1744ac99a
Add the ProductAttributesLookup\DataRegenerator class.
This class creates and fills the product attributes lookup table
from the existing products. It does so by in small chunks by using
Action Scheduler; it handles all the batches and the scheduling
by itself.

It also adds two entries to the debug tools menu:

- Initiate lookup table regeneration (deleting the existing table first)
- Enable or disable the actual usage of the lookup table
  for product filtering

The first one is the only way to generate the lookup table for now
(there's no explicit data migration).

The actual filling of the table is delegated to a LookupDataStore class
that is not implemented yet, so for now the table isn't actually filled.
Also enabling/disabling the lookup table usage has no real effect yet.
2021-04-28 10:30:11 +02:00
Nestor Soriano 10adec6b88
Improvements in the engine behind the debug tools page.
Two new optional keys have been added to the tool definition array:

- 'disabled': when true the tool button will appear disabled.
- 'needs_refresh': when running a tool, by default the tool definitions
  are retrieved first, then the selected tool is executed,
  then the definitions previously retrieved are rendered.
  When this key is true the tool definitions are retrieved again
  after execution, useful for cases where the tool description
  or button enable/disable state changes after the tool execution.

Also now if a tool execution throws an exception a notice will be
shown with the execption message, previously the exception
was unhandled.
2021-04-28 10:24:23 +02:00
Nestor Soriano bad3df3e23
Fix code sniffer errors 2021-04-28 09:36:10 +02:00
Roy Ho aab56d84e0
Merge pull request #29752 from woocommerce/fix/29730
Set USD as default store currency
2021-04-23 13:29:34 -07:00
Jonathan Sadowski cd7b8ee30f Fix unit tests for new default USD currency 2021-04-23 10:03:05 -05:00
Jonathan Sadowski 55ab8cb966 Set USD as default store currency 2021-04-23 09:29:12 -05:00
Roy Ho 03d4d4893e
Merge pull request #28187 from woocommerce/fix/25900-take-2
Fix: image size customisation controls not shown when theme doesn't define them but Woo core does
2021-04-22 05:41:57 -07:00
Vedanshu Jain 0df1d3ef64
Merge pull request #29599 from woocommerce/enhancement/email-setting-help-text
Change the help text in email settings to include debugging steps.
2021-04-21 22:15:55 +05:30
Nestor Soriano 3a895c9eed
Move ThemeSupport class to Internal namespace, and use in 2021 theme. 2021-04-21 12:57:56 +02:00
vedanshujain 96f1ccfe61 Use encoding instead of direct quote character to follow WP guideline. 2021-04-21 11:29:25 +05:30
vedanshujain 00a0118858 Improvements in text for translators. 2021-04-21 11:29:25 +05:30
Gracie Ofslager 43a502e185 Update class-wc-settings-emails.php
Adding copy to line 54 for instructions on how to ensure email is delivered successfully and linking to troubleshooting documentation.
2021-04-21 11:29:25 +05:30
Roy Ho e4fec5b914
Merge pull request #29721 from woocommerce/fix/29525
Modify wc_get_low_stock_amount function to always return a number
2021-04-20 11:56:27 -07:00
Nestor Soriano b88eb4c981
Rename "assertIsInt" to "assertIsInteger" and make it static
- Renaming to prevent conflicts with the existing method in
  the newer PHPUnit used in PHP 8.
- Making it static because "assertIsInt" is static too, so it'll be
  easier to replace in the future.
2021-04-20 17:16:59 +02:00
Nestor Soriano d214eab157
Use int cast instead of intval in wc_get_low_stock_amount 2021-04-20 16:35:42 +02:00
Nestor Soriano d11a20b5b4
Merge branch 'trunk' into fix/25900-take-2 2021-04-20 16:08:45 +02:00
Néstor Soriano a5333ffd1f
Merge pull request #29681 from woocommerce/fix/29540
Fix/29540
2021-04-20 15:50:14 +02:00
roykho 78a57e53ec
Update to use closure per review comment 2021-04-20 06:17:50 -07:00
Nestor Soriano 76a613a5bb
Modify wc_get_low_stock_amount so that it always returns an integer.
Previously, if the product didn't have an explicit low stock value
amount the value of the woocommerce_notify_low_stock_amount option,
which is a string, was returned verbatim.

Also, update related unit tests to create the option value as a string,
and to check that the value returned by woocommerce_notify_low_stock_amount
is always an integer.
2021-04-20 10:17:50 +02:00
Nestor Soriano 1008835488
Fix code sniffer violations in stock functions and its tests 2021-04-20 09:42:07 +02:00
Néstor Soriano 840849ad83
Merge pull request #29718 from woocommerce/fix/package-lock-maint
package lock maintenance
2021-04-19 17:28:47 +02:00
Ron Rennick 94e5991c66 package lock maintenance 2021-04-19 12:15:07 -03:00
Vedanshu Jain 09798c081c
Merge pull request #29699 from woocommerce/add/github-action-to-auto-assign-milestone
Add a GitHub action for automatic assignment of a milestone to merged PRs
2021-04-19 18:25:30 +05:30
Néstor Soriano 3ada9fc562
Change GH API query for milestones to get only the open ones.
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2021-04-19 14:46:45 +02:00
roykho 98901dc9ec
Merge branch 'trunk' into fix/29540 2021-04-16 13:51:12 -07:00
Barry Hughes 8cef18ab5b
Merge pull request #29702 from woocommerce/add/action-to-build-release-zip-file
Add a GitHub action to manually trigger the generation of a release zip file.
2021-04-16 13:47:56 -07:00
Greg 1b8e0c2b04
Merge pull request #29616 from woocommerce/e2e/e2e-shopper-calculate-shipping
Add new e2e test shopper cart calculate shipping
2021-04-16 14:23:39 -06:00
roykho c73ce8ea04
Convert to using internal DI container 2021-04-16 12:23:40 -07:00
Veljko 1c7bec0489 Remove shipping zones remover 2021-04-16 21:22:34 +02:00
Néstor Soriano 5da39b4ff0
Enclose action step name in double quotes for consistency.
Co-authored-by: Leif Singer <git@singer.sh>
2021-04-16 15:48:38 +02:00
Veljko 23e09d33dd Add shipping zones remover 2021-04-16 14:11:27 +02:00
Vedanshu Jain d79e86932b
Merge pull request #29654 from woocommerce/fix/29499
Set US:CA as the default store location
2021-04-16 16:54:50 +05:30
Nestor Soriano b09ddd7984
Add a GitHub action to manually trigger the generation of a release zip file 2021-04-16 13:06:49 +02:00
Veljko V a2f8216b9b
Merge branch 'trunk' into e2e/e2e-shopper-calculate-shipping 2021-04-16 11:51:52 +02:00
Greg 87a6ebf03f
Merge pull request #29693 from woocommerce/e2e/e2e-shopper-order-email-received
Add new e2e test shopper order email receiving
2021-04-15 15:20:52 -06:00
Greg 54f3eef6fb
Merge pull request #29672 from woocommerce/add/screenshot-utility
add screenshot utility
2021-04-15 11:45:18 -06:00
jonathansadowski 8865273440
Merge pull request #29479 from woocommerce/update/bump-wca-2.2.0-beta.2
Bump WooCommerce Admin version to 2.2.1
2021-04-15 12:31:47 -05:00
jonathansadowski dc08748aed
Merge branch 'trunk' into update/bump-wca-2.2.0-beta.2 2021-04-15 11:25:08 -05:00
Nestor Soriano a0c965964b
Add a GitHub action for automatic assignment of milestone to merged PRs
The milestone is chosen as follows:
1. List all the open milestones with a title of "X.Y.Z"
2. Sort them desc using verson_compare
3. foreach them in order, and take the last one not having a
   corresponding release branch ("release/X.Y")
2021-04-15 17:16:00 +02:00
jonathansadowski 8bef297875
Merge pull request #29651 from woocommerce/update/woocommerce-blocks-4.9.0
Update WooCommerce Blocks package to 4.9.1
2021-04-15 09:44:41 -05:00
Veljko 1bc0b25f0c Fix spaces 2021-04-15 14:30:06 +02:00
Veljko 5c633e1c3b Add deleting email logs if any 2021-04-15 14:01:28 +02:00
Veljko 950d08b7a5 Add new e2e test shopper order email receiving 2021-04-15 13:28:25 +02:00
Néstor Soriano 2243e6f60b
Merge pull request #29692 from woocommerce/preparation/5.2.2
Release preparation: 5.2.2
2021-04-15 10:44:25 +02:00
Nestor Soriano c887830d68
Update changelog and readme for 5.2.2, change stable tag to 5.2.2 2021-04-15 10:35:33 +02:00
Veljko a075232434 Updated code for calculating prices 2021-04-15 10:06:06 +02:00
Veljko V 80baefe89a
Merge branch 'trunk' into e2e/e2e-shopper-calculate-shipping 2021-04-15 09:10:35 +02:00
Ron Rennick fb0b51d330 merge trunk 2021-04-14 21:16:42 -03:00