Commit Graph

21222 Commits

Author SHA1 Message Date
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
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
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 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
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
roykho 98901dc9ec
Merge branch 'trunk' into fix/29540 2021-04-16 13:51:12 -07:00
roykho c73ce8ea04
Convert to using internal DI container 2021-04-16 12:23:40 -07: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
Claudio Sanches b07f41d598
Merge pull request #29572 from woocommerce/update/debug-logging-filter
Enhance woocommerce_logger_log_message filter
2021-04-14 16:20:37 -03:00
roykho 0bb3180d68
Schedule cron jobs for running the assign default cat function 2021-04-14 06:52:39 -07:00
roykho 8663c3b5f9
Assign default category to products closes #29540 2021-04-13 19:43:04 -07:00
Caleb Burks 0916dd3246 Update docblock 2021-04-13 17:21:00 -05:00
Caleb Burks b47cd85af0 Add docblock 2021-04-12 18:56:23 -05:00
roykho 6c7c420d25
Set US:CA as the default store location 2021-04-12 09:28:30 -07:00
Roy Ho 66b39c7ec7
Merge pull request #29322 from woocommerce/fix/ie11-tracking-error
IE 11 compatibility for the site tracking enable function
2021-04-09 13:28:45 -07:00
raicem 91a184dc77 Make the call to "wc_downloadable_file_permission" with the right product id
With the PR #23188, "$product_id" variable become undefined.
2021-04-09 09:39:49 +03:00
Roy Ho 72cc2c2a50
Merge pull request #29422 from Mauricio-Urrego/fix/issue-29421
Avoids redirect caused by some custom permalink structures.
2021-04-08 13:24:59 -07:00
Roy Ho a8572e755c
Merge pull request #29613 from woocommerce/fix/29567
Don't show the "WooCommerce Setup" widget in dashboard if WC Admin is disabled
2021-04-08 05:39:32 -07:00
Néstor Soriano 439d26be82
Merge pull request #29606 from woocommerce/fix/29545
Don't verify empty country codes on checkout
2021-04-08 12:40:13 +02:00
Nestor Soriano 1cf6b9d39e
Extra check for not showing the "WooCommerce Setup" widget in dashboard
if WC Admin is disabled
2021-04-08 09:31:51 +02:00
Roy Ho 8052fbe7be
Merge pull request #29605 from woocommerce/fix/28759-billing-shipping-addresses
Fix/28759 billing shipping addresses
2021-04-07 14:34:01 -07:00
Barry Hughes 568e1e4f94
Add `@since` tag 2021-04-07 14:11:08 -07:00
Claudio Sanches ec77c3bcc9
Merge pull request #29603 from masteradhoc/masteradhoc-accessibility-strikethrough-price
Improve WooCommerce Accessibility - Strikethrough Price
2021-04-07 13:41:08 -03:00
Nestor Soriano 43a2bb2a24
Don't show the "WooCommerce Setup" widget in dashboard if WC Admin is disabled 2021-04-07 15:38:25 +02:00
Nestor Soriano a37b2a7474
Don't verify empty country codes on checkout
PR #28849 introduced a verification of the posted country code
on checkout, so an invalid code will throw an error. However there
are cases when an empty code is legitimately received, for example
when using Paypal checkout directly from the product page and
the customer doesn't have an address in his Paypal profile.
2021-04-07 09:59:56 +02:00
Barry Hughes 87cdcff52d Merge branch 'trunk' into fix/28759-billing-shipping-addresses 2021-04-06 17:22:52 -07:00
Brian 6ca74affb0
Update class-wc-order.php
add aria-hidden="true" to <del>
2021-04-06 23:24:22 +02:00
Brian e2820e90f9
Update wc-formatting-functions.php
add aria-hidden="true" on <del>
2021-04-06 23:15:15 +02:00
Claudio Sanches 855f48d53b
Merge pull request #29314 from woocommerce/fix/prevent-missing-order-error
Return 0 if order isn't available in WC_Payment_Gateway::get_order_total
2021-04-06 17:06:54 -03:00
Claudio Sanches dff620fb20
Merge pull request #29584 from masteradhoc/masteradhoc-patch-typo-fix
fix typo in payment methods
2021-04-06 16:59:06 -03:00
Roy Ho 836c9e85b6
Merge pull request #29304 from jacobarriola/patch-1
New filter: stock check message
2021-04-05 08:17:09 -07:00
Jacob Arriola 319a45705d
Update WC version 2021-04-05 07:56:05 -07:00
Nestor Soriano 8729733da4
Escape short description 2021-04-05 11:58:37 +02:00
Brian f5dfee102d
fix typo 2021-04-04 00:18:27 +02:00
Caleb Burks 7706b199c5 Enhance woocommerce_logger_log_message filter 2021-04-01 19:37:39 -05:00
Claudio Sanches 1c40a28409
Merge pull request #29145 from mariovalney/patch-1
Add the support to optgroups in single select on Settings API
2021-04-01 19:08:43 -03:00
Claudio Sanches f1f1429cd3
Merge pull request #29538 from woocommerce/fix/address-prop-updating
Customer billing and shipping getters should return all address data, not just data that changed
2021-04-01 18:52:40 -03:00
Roy Ho 8b6e4ac519
Merge pull request #29542 from woocommerce/fix/23682.1
Update UID only for WooCommerce cookies
2021-03-31 16:05:28 -07:00
Claudio Sanches 6540b804b7 Added deprecated notice to nonce_user_logged_out 2021-03-31 19:29:26 -03:00
Claudio Sanches 5ebab07677 Fixed typo 2021-03-31 19:25:28 -03:00