Commit Graph

21552 Commits

Author SHA1 Message Date
And Finally 7202f19631 Added support for `geoblacklist` in `output_promotion_block`. 2021-05-12 17:54:20 +01:00
And Finally 6bb1ec73a4 Reverted renaming of `geowhitelist` and `geoblacklist`, in case they are still present in other endpoints. 2021-05-12 17:48:37 +01:00
And Finally de331ad893 Addressing feedback. Removed `!important` from `.addons-button-expandable` rule. Renamed `geowhitelist` and `geoblacklist` to `geo_allow_list` and `geo_block_list`. 2021-05-12 09:41:31 +01:00
Néstor Soriano d2da61ac53
Merge pull request #28132 from TimBHowe/update/fix-28111 2021-05-12 08:42:34 +02:00
Menaka S e20223f63e Make the restored function private 2021-05-12 06:48:36 +05:30
Menaka S ffd6bd4163 Make the new function private 2021-05-12 06:43:36 +05:30
Dan Wyman d13ce85b66 Set default value for variable 2021-05-12 06:40:53 +05:30
Menaka S 5dfac89d80 Add function to get order details by gateway 2021-05-12 06:40:53 +05:30
Menaka S 20b39bedac Restore direct SQL queries and functions from WC 5.0 2021-05-12 06:40:53 +05:30
Claudio Sanches c520505dbe
Merge pull request #29809 from kapilpaul/fix/coding-style-in-class-wc-email
fix: coding style in class-wc-email.php
2021-05-11 18:02:39 -03:00
Claudio Sanches af809c70cb
Merge pull request #28335 from OlegApanovich/fix/28008
Fix filter woocommerce_shipping_rate_cost backwards compatibility
2021-05-11 13:34:19 -03:00
roykho 006f580b28
Remove unneeded order_version 2021-05-11 08:54:35 -07:00
roykho b808d9a24f
Fix merge conflicts 2021-05-11 08:53:03 -07:00
roykho 8c3e90b3ce
Initialize _restock_refunded_items meta on order update 2021-05-11 08:35:48 -07:00
Christopher Allford fd624f77c8
Merge pull request #29044 from woocommerce/fix/issue-28284
Fix/issue 28284
2021-05-10 11:38:20 -07:00
Roy Ho f9441dcc00
Merge pull request #29778 from woocommerce/add/29608
Product attributes lookup table creation and filling
2021-05-10 07:41:39 -07:00
Nestor Soriano 78ab6fe079
Fix syntax error after manual merge conglict resolution 2021-05-07 12:26:18 +02:00
Nestor Soriano 8b12fee96f
Merge branch 'trunk' into refactor/settings-pages-classes-take-2 2021-05-07 12:16:13 +02:00
vedanshujain b487e363ce Restore formatting but without rounding for backward compat. 2021-05-07 14:58:52 +05:30
vedanshujain 18411d2b3b Add code comments for confusing changes. 2021-05-07 14:30:45 +05:30
vedanshujain 833193b7f7 Round tax amount appropriately before displaying.
We have special method to round taxes which may round up or round down depending upon settings. This method should be used instead of default rounding in formatting funtions.
2021-05-07 14:30:45 +05:30
vedanshujain a0d6cea139 Round shipping and fees tax seperately since they are entered excl taxes.
We round up or round down depending upon if prices are entered inclusive or exclusive taxes, however since shipping and fees are always entered exclusive of taxes, they should always be rounded down.
2021-05-07 14:30:44 +05:30
vedanshujain 30cbf4638d Use constant instead of magic numbers. 2021-05-07 14:30:44 +05:30
vedanshujain b156e329f8 Remove rounding from lines which are not final totals. 2021-05-07 14:30:44 +05:30
vedanshujain 973bba347f Remove rounding from subtotals as they would already be rounded depending upon settings. 2021-05-07 14:30:44 +05:30
vedanshujain 43822b7401 Remove rounding from individual item discount taxes.
Rounding here conflicts with round at subtotal settings becase we would round at line item level irrespective of settings.
2021-05-07 14:30:44 +05:30
And Finally e4d3b157ff Changed block name and CSS classnames to the more generic "promotion block". 2021-05-06 22:12:07 +01:00
Tim Howe f179ff6741 Added dates_are_gmt parameter to allow the uses of post_date_gmt column with the before and after parameters for the order RESTAPI 2021-05-06 17:06:06 -04:00
Yehuda Hassine ab6404f6f1 Remove Curaçao postcode 2021-05-06 23:02:18 +03:00
Khoi Nguyen aa913b59ed Set loop prop to widget products to set condition on single product page 2021-05-06 22:22:58 +07:00
TimBHowe 98af7209da Added the 'after_gmt' and 'before_gm' parameters 2021-05-06 10:58:27 -04:00
And Finally 21b4801cc1 Fixing doc comment for new method. 2021-05-06 15:40:02 +01:00
And Finally 2b053d4586 Added docblock comment for `$section` param. 2021-05-06 15:22:53 +01:00
And Finally f1a69cb4af Added comment to new `output_ad_block` method. Removed differences introduced by PhpStorm autoformat. 2021-05-06 15:16:49 +01:00
And Finally 3fa233872c Added `output_ad_block` method to `WC_Admin_Addons` and CSS rules to render a WooCommerce Payments ad banner at the top of the "Featured" section of the WC Core addons page, `wp-admin/admin.php?page=wc-addons&section=_featured`. This is to fulfil the requirements of WooCommerce.com issue https://github.com/Automattic/woocommerce.com/issues/9860.
We output the block if

- The user has permissions to install plugins.
- Their location is in one of the countries identified in a `geowhitelist`.
- WooCommerce Payments is not already active.
2021-05-06 12:55:30 +01:00
barryhughes 7ea5c7501f Test for the presence of 3 or more args (not 2 or more). | #29124 2021-05-05 11:43:14 -07:00
Nestor Soriano f53f959d03
Fix the usage of FakeQueue in DataRegeneratorTest.
Also update the doc comment of FakeQueue itself on how to use it.
2021-05-05 11:11:36 +02:00
Nestor Soriano 6820b6e519
Add the WC_Queue::reset_instance method 2021-05-04 16:13:48 +02:00
Kapil Paul 4ae714de56 fix: coding-style-in-class-wc-email.php 2021-05-02 00:52:38 +06:00
roykho ccef7c46a3
Restore testing version 2021-04-29 07:25:26 -07:00
roykho 87047c77df
Limit the new refund restock logic to order version 5.4+ 2021-04-29 06:30:53 -07:00
Nestor Soriano 7f2c2d8b72
Add logging for errors during the execution of a debug tool. 2021-04-29 11:20:25 +02:00
Jonathan Sadowski 98b4968ec2 Address code sniff issues 2021-04-28 16:26:32 -05:00
roykho 6c804e31d7 Update deprecated hovers 2021-04-28 16:22:00 -05:00
roykho 387e095a01 Update deprecated jQuery functions in includes folder 2021-04-28 16:21:59 -05:00
Marcos 971f41a89e
Check for WP Error when uploading placeholder 2021-04-28 14:04:47 -03:00
roykho 6432e06e7d
Update value of to take refunded item quantity when is not set 2021-04-28 07:28:47 -07:00
gilesholder 44493149d5
Update settings-paypal.php
Makes IPN notification title consistent with the other titles (no capital letter starts on new words)
2021-04-28 12:36:45 +01:00
Bero 1d232ddd1f Merge branch 'trunk' into update/extensions-search-all-categories 2021-04-28 11:06:24 +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
barryhughes 2a70009c89 Merge branch 'trunk' into fix/27317-selectwoo-a11y 2021-04-27 13:23:56 -07:00
roykho 980fe7c759
Add to the restock_refunded_items count instead of replacting 2021-04-27 07:22:28 -07:00
Albert Juhé Lluveras 9ae0b52afd Allow Product Categories and Products Tags to be shown in REST
This way, they can be searched when adding the Product Category Link
and Product Tag Link blocks.
2021-04-27 15:10:01 +02:00
Albert Juhé Lluveras 5ab690e2a0 Add item_link and item_link_description labels to Products, Categories and Tags 2021-04-27 15:09:33 +02:00
roykho d571e570e4
Remove set_backorders logic from external products closes #29696 2021-04-26 08:18:09 -07:00
roykho 7105a7a17e
Update restock logic during refunds closes #29502 2021-04-23 12:14:51 -07:00
Jonathan Sadowski 55ab8cb966 Set USD as default store currency 2021-04-23 09:29:12 -05:00
Ovidiu Liuta f01c4a288c
fixing phpcs comment 2021-04-23 14:22:50 +03:00
Ovidiu Liuta b23f117d84
coding style fixes 2021-04-23 12:34:23 +03:00
Ovidiu Liuta f715e2a72f
Update abstract-wc-csv-batch-exporter.php 2021-04-23 12:23:18 +03:00
Ovidiu Liuta 1e6dd0acce
Fixing batch export limitations
This commit will fix the batch export issues related to distributed file systems and memory limitations.

Basically, instead of pretending the headers at the last step of the export and loading the full CSV content into memory each time data needs to be added, we basically will append the data to the created file on each batch request; and at the last step, we will also create a temporary file to store the CSV headers, so when preparing the download to the user, this will simply read the CSV headers from the created temporary file.
2021-04-23 12:20:45 +03: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
kkmuffme 5c07f8e7e1
Sort country codes alphabetically
Sort country codes alphabetically to make finding them easier.
2021-04-19 17:06:59 +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
barryhughes 1d8e01d861 Update registered SelectWoo version. 2021-04-16 11:37:02 -07:00
barryhughes 1a2140ff43 Drop/remove auto-generated ID attr for select labels. 2021-04-16 11:04:44 -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
Bero edd8f545df Always search all addons 2021-04-16 11:54:10 +02:00
barryhughes 27db35de67 Update SelectWoo to 1.0.9 and take advantage of data-label support. 2021-04-15 16:55:29 -07:00
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 6ed847a7b9
Deprecate method instead of removing it 2021-04-13 19:53:00 -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
Nestor Soriano cf9300bbbc
Refactor in the WC_Settings_Page class for PHP 8 compatibility
- Turn get_settings into a parameterless method, but accept one
  parameter via func_get_arg; and mark the method as deprecated.
- Rename the existing get_settings to get_settings_for_section;
  and mark the method as final.
- Rename the existing get_settings_for_section to get_settings_for_section_core.

See the comment added to get_settings for the rationale for the change.
2021-04-13 12:45:42 +02:00
Nestor Soriano 5af12170d7
Make the WC_Settings_Page::get_settings_for_section final
This helps on conveying the notion that the method to be overriden
is get_settings_for_section_core instead (or get_settings_for_X_section
methods must be added).
2021-04-13 09:31:50 +02: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
Nestor Soriano 56cc063d7f
Rename "get_settings" to "get_settings_for_section" in settings pages.
In PHP 8 overriding a method having an optional parameter with a
method having no parameters throws an error, thus we can't use
the strategy of changing "get_settings()" to "get_settings($section='')"
without breaking existing extensions. So we do the following instead:

- Rename the existing "get_settings" to "get_settings_for_section"
- Rename the existing "get_settings_for_section" to "get_settings_for_section_core"
- Add a "get_settings" that just does "get_settings_for_section('')"
  for compatibility, but mark it as deprecated.
2021-04-12 18:04:41 +02:00
Nestor Soriano ca46992c00
Adjustments in settings pages after a merge with conflicts. 2021-04-12 15:55:45 +02:00
Claudio Sanches e2e914ed39
Remove todo 2021-04-12 12:50:21 +02:00
Claudio Sanches 1f51e0c9fc
Remove "Features" menu 2021-04-12 12:50:21 +02:00
Nestor Soriano 65c1c9ec54
Fix unit tests after merging from trunk 2021-04-12 12:50:21 +02:00
Nestor Soriano d820fbe4a7
Fix wrong handling of the shipping - shipping options section. 2021-04-12 12:42:40 +02:00
Nestor Soriano e5f234ec0f
Re-implement the flushing of the term count cache that was lost on merge
Also add unit tests for it.
2021-04-12 12:42:39 +02:00
Nestor Soriano 5a11d9e064
Refactor the settings pages, and add unit tests for them.
This commit fixes some inconsistencies in the settings pages, and
makes all the existing pages extensible by adding new sections
(that was possible in some pages, but not in others). Main changes:

1. Modify the 'get_sections' method so that it invokes a new protected
   'get_own_sections' method and then triggers the
   'woocommerce_get_sections_' . id filter.

This way the filter is triggered only in the base class
and not in each of the derived classes too.

2. Change the get_settings() method so that it has its signature
   changed to get_settings( $current_section = '' )
   in the base class and in all the derived class.

Some derived classes were already using this signature, but others
(those not having multiple sections natively) weren't, making then
effectively impossible to define multiple sections for these pages
via filters.

With this change all the section pages act consistently and allow
both adding new settings to the default "General" section
and creating new sections via filters.

3. Change the implementation of 'get_settings' in the base class
   so that it searches for a 'get_settings_for_{section_id}_section'
   method in the class and executes it, otherwise it executes the new
   protected method get_settings_for_section( $current_section ); then
   it triggers the 'woocommerce_get_settings_' . id filter.

This makes it easier to separate the code that returns the list
of filters in multiple methods, one per section, instead of using
one big if-else-else... block.

So now instead of overriding get_settings($current_section='') derived
classes need to implement get_settings_for_{$current_section}_section
for each section, or override get_settings_for_section($current_section)
or both. 'get_settings_for_section' returns an empty array by default.

Also, 'woocommerce_get_settings_' . id is triggered in one single
place too.

Other improvements:

* Remove duplicated code from 'output' in 'WC_Settings_Page' children.

Some classes inherited from 'WC_Settings_Page' override the 'output'
method with custom code, which in all cases ended up repeating the code
of the original method as a fallback. These repetitions have been
replaced with 'parent::output()'.

* Fix inconsistencies for 'save' and 'output' in WC_Settings_Tax/Emails

The 'WC_Settings_Tax' and 'WC_Settings_Emails' classes had some
inconsistencies in their 'save' and 'output' methods that prevented the
proper creation new sections and the addition of new settings via the
'woocommerce_get_sections_' and 'woocommerce_get_settings_' filters.
Now they work as expected.

* Deduplicate parts of 'save' in 'WC_Settings_Page' and children.

Two methods have been added to 'WC_Settings_Page' class:
'save_settings_for_current_section' and 'do_update_options_action'.
These are intended to be invoked by derived classes in their 'save'
methods, in order to remove code repetition.

* Add some helper methods to WC_Unit_Test_Case.

Methods added:
- assertOutputsHTML
- assertEqualsHTML
- normalize_html
- capture_output_from
2021-04-12 12:42:26 +02: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
roykho e1c6c540d7
Convert notices to use native nonce generation from WC Admin 2021-04-09 05:33:06 -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
Roy Ho 1d0b068d56
Merge pull request #29517 from woocommerce/fix/wc-subscriptions/4002
Update the persistent cart after it's loaded on log in
2021-03-31 13:25:20 -07:00
𝓑𝓪𝓻𝓻𝔂 𝓗𝓾𝓰𝓱𝓮𝓼 095b3e9fb9 Merge latest changes from trunk. 2021-03-31 10:25:25 -07:00
Roy Ho e4502fe314
Merge pull request #29495 from woocommerce/fix/29472
Add "postcodes" and "cities" support for the REST API tax rate creation/update endpoint
2021-03-31 08:17:31 -07:00
Nestor Soriano 64e903f65f
Update REST API v3 taxes endpoint descriptions with deprecation/introduction information. 2021-03-31 12:41:53 +02:00
Nestor Soriano 8ff664e758
Fix "doing wrong wpdb::prepare" notice for REST API get taxes endpoint. 2021-03-31 12:09:20 +02:00
James Allan 09b5fb4691 Update the rate when recalculating and updating order tax items 2021-03-30 22:27:11 -03:00
Claudio Sanches 076248aca0 Fixed logic of get_customer_unique_id 2021-03-30 18:17:12 -03:00
Claudio Sanches f913dc09dd Improve get_customer_unique_id() 2021-03-30 14:53:37 -03:00
Claudio Sanches 6dd707556b
Merge pull request #29534 from mehrshaddarzi/patch-2
Fix columm to column
2021-03-30 14:14:05 -03:00
Claudio Sanches 2da3a37450 Added unit test 2021-03-30 14:11:33 -03:00
Claudio Sanches 65b024a96d Moved to a new function 2021-03-30 14:11:24 -03:00
Claudio Sanches b2c8113525 Change UID only for WooCommerce cookies 2021-03-30 13:10:21 -03:00
Mike Jolley 35b02e1660 Customer billing and shipping getter should merge changed data 2021-03-30 16:27:09 +01:00
Nestor Soriano 1b351a6685 Sanitize tax class and display errors in admin while creating tax classes 2021-03-30 11:08:35 +02:00
Nestor Soriano b3d5930279 Check if is required a verified product owner before placing a review 2021-03-30 11:07:34 +02:00
Nestor Soriano 0045df2cb0 Make product name escaping consistent in the front-end 2021-03-30 11:04:44 +02:00
Mehrshad Darzi 027b335028
Fix columm to column 2021-03-30 12:43:41 +04:30
Néstor Soriano 8e57d58555
Merge pull request #29474 from woocommerce/fix/27290-take-2
Fix the REST API entry point to add coupons to an order.
2021-03-30 09:22:27 +02:00
Nestor Soriano 0f271b10ed Apply coupon code instead of verified coupon to avoid caching issues
(in REST API endpoint to update order coupons)
2021-03-29 15:33:15 +02:00
Nestor Soriano 24973ec5eb Don't check validity of coupons already present in the order
(REST API endpoint to update order taxes)
2021-03-29 12:55:56 +02:00
Nestor Soriano e0dad77e49 Fix logic for including the "payments" task in onboarding wizard
The logic should be "if woo payments is installed and the country
is US then remove the payments task" but the check was mistakenly
being set to "or" so the task was removed whenever the country was US.
2021-03-29 11:25:39 +02:00
James Allan ea41379b7b Update the persistant cart after it's loaded on log in 2021-03-29 15:28:34 +10:00
𝓑𝓪𝓻𝓻𝔂 𝓗𝓾𝓰𝓱𝓮𝓼 f0c164d2d4 Do not copy fields from the billing address to the shipping address. | #28759 2021-03-26 17:08:37 -07:00
Jacob Arriola 76744da6f9
Use sprintf, no printf when setting the variable 2021-03-26 08:55:24 -07:00
Claudio Sanches 50e036f934
Merge pull request #23188 from LuigiPulcini/master
Add $item to wc_downloadable_file_permission
2021-03-25 12:19:08 -03:00
Nestor Soriano b5e13bd771 Add support for "postcodes" and "cities" (arrays) fields to the
REST API endpoints for creating and updating taxes.
2021-03-25 14:56:40 +01:00
Nestor Soriano cd82c48a73 Fix: WC_REST_Taxes_V1_Controller::create_or_update_tax erroring when
no core fields were included in the request (e.g. only postcodes
or cities were specified)
2021-03-25 14:56:40 +01:00
Nestor Soriano 4c07ab6ae6 WC_REST_Taxes_V1_Controller::get_items: add 'priority' to the schema for 'orderby' 2021-03-25 09:41:10 +01:00
Nestor Soriano c1427fc5ee Improvements in WC_REST_Taxes_V1_Controller::get_items :
- Use wpdb->prepare to compose the queries.
- Actually make use of the 'order' parameter.
2021-03-25 09:38:23 +01:00
Nestor Soriano 0baa2d6314 Fix code sniffer errors in WC_REST_Taxes_V1_Controller 2021-03-25 09:36:21 +01:00
Nestor Soriano 2b8cac7cf2 Fix the REST API entry point to add coupons to an order.
- Check input (no 'id', has 'code') and throw an error if needed
  before removing the existing coupons, so an invalid input
  won't cause the loss of these existing coupons.
- Also, check that the coupon is actually valid as part of the
  input check.
- Cache the coupon objects that are created during the input check,
  and apply them directly.
- Don't check if 'coupon_lines' is an array and contains arrays,
  that's already done by the REST API engine by looking at the schema.
- Adjust unit tests.
2021-03-24 15:19:34 +01:00
Timo Boyer 3e5d7418d9 Remove double space before concat operator 2021-03-23 23:29:30 +01:00
Quy f0cc75223d
Remove colon since checkbox is before label 2021-03-23 14:00:50 -07:00
Timo Boyer f31bc26b61 Correctly close <option>-tag in admin products/orders list table 2021-03-23 21:23:46 +01:00
Roy Ho 7fb346c5d1
Merge pull request #29447 from luizbills/patch-1
Add missing sectionend in email settings
2021-03-23 09:48:11 -07:00
jonathansadowski 2e60d47a01
Merge pull request #29181 from woocommerce/fix/27233
Use AJAX for Page Configuration
2021-03-23 11:46:00 -05:00
Luiz "Bills 3e48ca7c35
fix coding standard 2021-03-23 13:25:20 -03:00
Néstor Soriano df78a5cba6
Merge pull request #27751 from mahmoudsaeed/fix-rest-tax
Fix taxes endpoint not returning multiple postcodes/cities
2021-03-23 17:04:09 +01:00
Roy Ho 2f2c07ead6
Merge pull request #29452 from Kudratullah/trunk
Fixed return type of $type in docblock
2021-03-23 08:30:56 -07:00
Luiz "Bills df4b584a82
delele empty space 2021-03-23 12:06:10 -03:00
Néstor Soriano 886cd15016
Merge pull request #29378 from woocommerce/fix/code-sniff
Remove Travis and fix CI in GitHub Actions
2021-03-23 15:22:49 +01:00
roykho c79fd6b7bf
Add excludes feature to exclude certain pages 2021-03-22 13:36:55 -07:00
roykho e5380ac966
Add new function to handle single page search closes #27233 2021-03-22 13:20:16 -07:00
Nestor Soriano 0cdb1f74c1 Revert replacing wp_redirect with wp_safe_redirect
Following a code snippet suggestion the wp_redirect in
WC_Checkout::process_order_payment was replaced with wp_safe_redirect,
but this had unitended side effects. From issue #29387:

You've changed wp_redirect to wp_safe_redirect in
WC_Checkout::process_order_payment. If a 3rd-party-plugin executes a
"non-AJAX-processing-order", wp_safe_redirect will be executed.
But your default PayPal interface will redirect to an URL that is
not allowed in wp_validate_redirect because your default PayPal Gateway
does not add the required PayPal URLs with the hook
"allowed_redirect_hosts". As a result, it could happen that a customer
is not redirected to PayPal but to wp-admin
(https://developer.wordpress.org/reference/functions/wp_safe_redirect/).
2021-03-22 16:11:11 +01:00
roykho 96463b7172
Update verbiage based on feedback 2021-03-22 05:42:34 -07:00
Kudratullah 8567b8611f
Fixed return type of $type in docblock 2021-03-21 09:08:36 +06:00
Luiz "Bills f4565abccb
Add missing sectionend in email settings 2021-03-20 14:51:27 -03:00
Claudio Sanches 9398c894c9
Merge pull request #27985 from woocommerce/set_rate_id_on_recalculate
Update the tax rate meta when recalculating and updating order tax items
2021-03-19 12:40:43 -03:00
roykho 01f949cc32
Update SSR db version tooltip to accurately describe the versioning closes #29430 2021-03-19 06:27:17 -07:00
Roy Ho a46e889e37
Merge pull request #29396 from Spreeuw/issue-29395
check return type on log file fopen
2021-03-19 05:57:55 -07:00
Nestor Soriano a5e4bad042 Update the WooCommerce version in (class-)woocommerce.php to 5.3 2021-03-19 11:08:37 +01:00
Ewout Fernhout b0b2803989 removed excess indentation 2021-03-18 18:19:40 +01:00
Mauricio Urrego 26c7e238f6 Avoids redirect caused by some custom permalink structures. 2021-03-18 14:51:09 +01:00
Roy Ho e62f20b9b3
Merge pull request #29049 from wppunk/master
Fix #29048
2021-03-17 13:46:19 -07:00
Roy Ho f89b21488e
Merge pull request #29391 from woocommerce/fix/28516
Handles errors in fault installations of PHP Intl
2021-03-17 09:43:06 -07:00
Claudio Sanches 3a629efc4b Check if order exists while check if COD is available 2021-03-17 13:20:46 -03:00
Claudio Sanches fc991ac418 Remove translation function 2021-03-17 12:50:52 -03:00
Peter Fabian aa9b6ab691 Change got merged sooner than expected. 2021-03-17 10:13:28 +01:00
Néstor Soriano 17224d0ab1
Merge pull request #29345 from woocommerce/hw/low-stock-threshold-for-variations
Low stock threshold for variations
2021-03-17 08:59:32 +01:00
Claudio Sanches 5c6778a0dc Fix coding standards 2021-03-16 11:46:34 -03:00
Claudio Sanches b0dce9feff Fixed coding standards 2021-03-16 11:42:28 -03:00
Peter Fabian cb6e0d8201 Don't echo the strings, return them for later use. 2021-03-16 13:01:15 +01:00
Peter Fabian a2e9c055d5 Make the inherited values explicit by stating where it comes from. 2021-03-16 12:39:25 +01:00
Ewout Fernhout c51f748855 check return type on log file fopen 2021-03-16 12:05:06 +01:00
Peter Fabian f33c80186f Updated the wording of the tooltip. 2021-03-16 08:51:29 +01:00
Claudio Sanches 3f50ab3278 Handles errors in fault installations of PHP Intl 2021-03-15 17:48:49 -03:00
Mahmoud Saeed 0e13eb1320 Fix taxes endpoint not returning multiple postcodes/cities 2021-03-15 22:16:36 +02:00
Peter Fabian bb5c56c148 Set correct placeholder value for variation--first the parent, then the store-wide default. 2021-03-15 18:41:55 +01:00
Peter Fabian e6cdd74a79 Add parent's default for low stock if notthing is set on individual variation.
I.e. use variation low stock amount value, if not available, use parent product's value, if not available, use the store-wide default.
2021-03-15 18:31:31 +01:00
Roy Ho 57569c5168
Merge pull request #29232 from Dartui/trunk
Pass checkout submit result to triggered handler
2021-03-15 09:46:31 -07:00
Peter Fabian 2ae5ec59ba Improve the description of the low stock threshold tooltip. 2021-03-15 12:42:10 +01:00
Peter Fabian 8bfa97d633 Use null rather than empty string to signify unset value. 2021-03-15 12:37:39 +01:00
Claudio Sanches 32baae989d Fixed just one PHPCS error to trigger messages in PR 2021-03-13 21:08:20 -03:00
Krzysztof Grabania aebdf869d9 Add order_id to checkout result response 2021-03-13 10:52:08 +01:00
roykho efdf76634b
Fix docblock defaults to false closes #29367 2021-03-12 11:59:18 -08:00
Roy Ho ee90c02f63
Merge pull request #29218 from wywarren/fix/27553
Fix for issue #27553 - REST API v3 not supporting settings type `order` and `class` for settings type on shipping zone methods
2021-03-11 09:22:34 -08:00
Peter Fabian aac4ecc943 Added comment documenting the history of the function. 2021-03-11 16:58:51 +01:00
Peter Fabian 1f8f8580d1 Better wording of the tooltip--being more specific about what the amount relates to. 2021-03-11 16:26:41 +01:00
Peter Fabian b48a389264 Add support for low stock amount to REST API v3. Ref #27371. 2021-03-11 16:21:43 +01:00
Néstor Soriano b446417be6
Merge pull request #29281 from woocommerce/fix/issue-25375-cache
Fix/issue 25375 cache
2021-03-11 08:30:41 +01:00
roykho 1df38c2f6b
Refactor and moved filter to _wc_recount_terms function 2021-03-10 12:33:46 -08:00
Peter Fabian f7755f123e Enable bulk updates of variations with low stock amount. 2021-03-10 18:15:31 +01:00
Peter Fabian e2e589b049 Don't take the low stock amount info from the parent of the variation, but the variation itself.
Potentially bw incompatible.
2021-03-10 17:57:56 +01:00
Peter Fabian 685be2a791 Connect the UI to the db to allow updates of the values. 2021-03-10 17:24:52 +01:00
Peter Fabian b92d1d1391 Harmonize the id and name with simple product. 2021-03-10 15:38:49 +01:00
Daniel Rey López 1fc1b604b9
IE 11 compatibility for the site tracking enable function 2021-03-10 11:52:01 +00:00
Peter Fabian a6b45d08bf Added low stock threshold input to the Admin UI. 2021-03-10 11:47:22 +01:00
Claudio Sanches f6b4614225 Return 0 if order isn't available 2021-03-09 16:57:08 -03:00
roykho cf634987b4
Prepare default branch 2021-03-09 06:11:41 -08:00
Jacob Arriola 5b02c440d7
New filter: stock check message
Adds a new filter to allow customization of the stock check message when a product is out of stock, but accounting for what's already in the cart. It mimics the existing woocommerce_cart_product_not_enough_stock_message filter.
2021-03-08 10:38:23 -08:00
Saggre 24167a5eed Fix typos in docs 2021-03-05 11:19:58 +02:00
roykho 71d8f760b0
Apply recount term per product with filter to product data store 2021-03-04 13:54:09 -08:00
roykho cb0b92750b
Extract recount terms logic into own function closes #25375 2021-03-04 09:06:03 -08:00
Roy Ho 20c8cbee0c
Merge pull request #29008 from inc2734/patch-1
The order of the full name returned by WC_Countries::get_formatted_address()
2021-03-04 07:31:45 -08:00
Claudio Sanches d8735d7225
Merge pull request #29151 from woocommerce/hide_coupon_on_incomplete_checkout
Prevent displaying coupon form on checkout requiring login
2021-03-03 17:05:53 -03:00
Roy Ho 9ba49a0e4b
Merge pull request #29117 from tyler-paulson/docs
Fixes to documentation of WC_Shipping_Rate
2021-03-03 11:54:02 -08:00
Moon 00a272fa85
Merge pull request #29174 from woocommerce/add/28568-dashboard-widget-finish-setup
Add/28568 dashboard widget - setup
2021-03-02 16:46:51 -08:00
Moon d013d7f765 Move init logic to should_display_widget 2021-03-02 16:06:10 -08:00
Néstor Soriano 1181c4be4a
Merge pull request #28535 from woocommerce/add/disable_wc_admin_tracking
Tracker: Add tracking of woocommerce_admin_disabled usage.
2021-03-02 09:35:38 +01:00
Claudio Sanches 6df220c2cc
Merge pull request #29121 from hsingyuc/fix/28868
Remove extra content wrapper
2021-03-01 14:09:13 -03:00
Claudio Sanches df191037c6
Merge pull request #29241 from woocommerce/update/28936
Merging 28936
2021-02-26 20:55:45 -03:00
Claudio Sanches d133ee9d08 Fixed docblock 2021-02-26 20:54:40 -03:00
Claudio Sanches 3ed9e4b259
Merge pull request #28936 from Mindsize/wc-26857-add-action-remove-order-item
WC Issue: 26857 - Add action remove order item
2021-02-26 20:53:23 -03:00
Claudio Sanches bcdfe3cb68
Merge pull request #29182 from woocommerce/fix/26973-get-customer-location
Avoid/minimize wc-ajax requests when `geolocation_ajax` is enabled | #26973
2021-02-26 20:33:29 -03:00
roykho 503a218e85
Revert "Flush term cache when saving product and settings closes #25375"
This reverts commit 8b0915c4e0.
2021-02-26 12:42:23 -08:00
Roy Ho f6d77c206d
Merge pull request #29228 from woocommerce/fix/28238
Update default GIT branch
2021-02-26 11:59:09 -08:00
Vedanshu Jain 422002a2a8
Merge pull request #29200 from woocommerce/fix/upgrade-notices-major-version
Remove compatibility checks for major version
2021-02-26 14:55:30 +05:30
Warren Wang d6b2e91c9d Minor adjustments to fit coding standards
Added periods to comments and proper spacing and capitalization to comments.
2021-02-26 13:45:20 +08:00
Claudio Sanches d6e3cf6de9 Update default GIT branch 2021-02-25 20:51:14 -03:00
Timmy Crawford c7a19b538a Updates per feedback. 2021-02-25 15:19:27 -08:00
Timmy Crawford 47a3d1bfb3 Tracker: Add tracking of woocommerce_admin_disabled usage. 2021-02-25 15:19:27 -08:00
Claudio Sanches 23710744c0
Merge pull request #29208 from woocommerce/fix/add-to-cart-variation-id
Validate variation ID while adding products to the cart
2021-02-25 19:13:32 -03:00
Peter Fabian 47bfca58b0
Merge pull request #29052 from woocommerce/add/install_wcpay_addon_tracks
Add tracks event for WooCommerce Payments install via wc-addons page
2021-02-25 15:04:36 +01:00
louwie17 893fe6cc24
Merge pull request #29149 from woocommerce/update/28569_status_widget_net_sales_link
Woocommerce dashboard status widget net sales link and logic
2021-02-25 09:09:29 -04:00
Warren Wang 8605ada7cf Fix for issue #27553
REST API v3 shipping method zone endpoint input payload not allowing settings type to be of type `class` or `order`. Added missing item schema.
2021-02-25 18:01:49 +08:00
Peter Fabian 8566a79da0 Pull out the constant to a globally accessible place so that it can be reused. 2021-02-24 14:29:45 +01:00
Claudio Sanches e2478b7c76 Use product already loaded 2021-02-23 21:10:34 -03:00
Claudio Sanches 76e1ba4bf0 Validate variation ID while adding products to the cart 2021-02-23 16:27:57 -03:00
Peter Fabian 313ea8541c Remove compatibility checks for major version.
In addition to #28840, there are other places where we make use of compatibility check with major versions. I've discovered 2:
- update through /wp-admin/update-core.php
- force disabling auto-updates if there are any extensions that haven't declared their compatibility with WC 5.0

This change updates both places to be in line with the changes done in #28840.
2021-02-23 13:27:06 +01:00
Peter Fabian 35d4ee4073
Merge pull request #28699 from woocommerce/fix/absolute-download-paths
Prevent local relative downloadable products to be treated as "absolute"
2021-02-23 11:50:34 +01:00
Moon 5c99233905 Minor fixes
* Removed extra double quotation from the image tag

* Fixed typo in the init() method

* Moved init() method body into the constructor -- a separate method is not necessary
2021-02-22 20:33:02 -08:00
Rasmy Nguyen 7a4b54ad38 Add section to tracks event props
This adds the Extenstions tab to the event props so we can determine
which tab merchants are installing wcpay from.
2021-02-23 12:25:40 +09:00
Rasmy Nguyen cbb1a540bd Change hook name and add id param to track method
This changes the addon install hook to match the other hooks in the
extensions tracking class. This also adds an addon_id param to the
callback associated with this hook so we can extend this to other
plugins in the future.
2021-02-23 11:34:28 +09:00
Rasmy Nguyen 4ad1465fe3 Add tracks event for WCPay install via addons page
This adds a tracks event for WooCommerce Payments installs via the
wc-addons page.
2021-02-23 11:34:28 +09:00
Moon 781c5e24d7 Status dashboard widget should be rendered only if onboarding tasks have been completed or hidden 2021-02-22 15:29:47 -08:00
Néstor Soriano 68dd901b65
Merge pull request #29051 from nielslange/update/#28724 2021-02-22 16:02:58 +01:00
Fernando f613bbaeba
Merge pull request #29105 from woocommerce/fix/disable-merchant-email-notes
Merchant email notes now are turned off by default
2021-02-22 09:48:00 -03:00
Christopher Allford 5e771d8e4f Started Converting Woo Page Dropdowns
Since the page selection dropdowns in the Advanced settings area are
populated on load we can end up taking a very long time to load on
shops that have lots of pages. This commit adds page search support
to wooSelect and starts converting the pages to use it.
2021-02-19 15:28:07 -08:00
barryhughes 761f155fc3 Avoid/minimize wc-ajax requests when `geolocation_ajax` is enabled | #26973 2021-02-19 14:50:59 -08:00
Claudio Sanches b6fe772d54
Merge pull request #29109 from woocommerce/update/add-tracking-to-status-widget
Add tracking to WooCommerce Status widget
2021-02-18 20:03:50 -03:00
Lourens Schep 966aca59ad Removed external class and moved logic to private functions 2021-02-18 16:05:00 -04:00
Barry Hughes 9f8145cd15
Merge pull request #28078 from woocommerce/fix/27949
Delay the registration of data exporters and erasers | #27949
2021-02-18 11:31:08 -08:00
Lourens Schep 4663d31f66 Fix some formatting changes 2021-02-18 12:01:52 -04:00
Lourens Schep 136e82ee01 Added a v2 report class that makes use of the wc-analytics if wc admin is not disabled 2021-02-18 12:01:52 -04:00
Peter Fabian a9da927049
Merge pull request #27277 from filipecorrea/26686-invalid-refund
Fix invalid refund amount error when no decimals
2021-02-18 14:59:08 +01:00
Vedanshu Jain 03ba8838b1
Merge pull request #29099 from woocommerce/fix/27376
Make the refunds creation REST API behave more as documented
2021-02-18 14:25:38 +05:30
Néstor Soriano 9c2b8ac9fd
Remove extra space at end of a couple of lines 2021-02-18 09:38:17 +01:00
Moon bc3219e22e Add tests for the finish setup dashboard widget and clean up code 2021-02-17 16:07:50 -08:00
Moon 6284cbee3a Add a new dashboard widget to promote store setup 2021-02-17 12:10:13 -08:00
Niels Lange e9d425ba65
Update includes/wc-template-functions.php
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2021-02-17 21:09:18 +07:00
louwie17 2471f816e4
Merge pull request #29093 from woocommerce/update/28570_widget_stock_links
Update the woo widget stock links to new analytics page
2021-02-17 09:35:50 -04:00
James Allan 264bccf505 Prevent displaying coupon form on checkout requiring login 2021-02-17 11:42:30 +10:00
Claudio Sanches 6fae8ca40b
Merge pull request #29146 from woocommerce/fix/27290-rest-api-order-updates
Throw an error if a coupon item ID (readonly) is specified during an order update | #27290
2021-02-16 17:04:49 -03:00
Mário Valney 323fc32959
Added esc_attr to selected like before 2021-02-16 15:01:07 -03:00
barryhughes 24e0191dc7 Throw a 400 error if a coupon item ID (readonly) is posted/put during an order update | #27290 2021-02-16 09:59:03 -08:00
Mário Valney 9a8cbfbd73
Support to optgroups on select from Settings API
Add the optgroups support to single select from Settings API.
The multiselect input already has this feature.
2021-02-16 14:49:25 -03:00
jonathansadowski f6054ab059
Merge pull request #29115 from woocommerce/fix/27434
Fix wrong taxonomy caching in term and product attributes controllers
2021-02-16 10:50:28 -06:00
Claudio Sanches e4b2b72e95
Merge pull request #29136 from woocommerce/fix/25510-billing-address-2
Only add '(optional)' to the billing_address_2 placeholder | #25510
2021-02-16 13:32:50 -03:00
artpi cca06857e9 Fix tests 2021-02-16 16:19:55 +01:00
artpi dc7410b6b3 Extra protections 2021-02-16 15:51:49 +01:00
artpi 774d7e38cd Better url parsing 2021-02-16 15:09:23 +01:00
artpi 0b076fb9c1 Fix to treat absolute local paths as relative ones 2021-02-16 10:40:14 +01:00
Moon 3707764736 Add tracking to WooCommerce Status widget -- net-sales, order-processing, orders-on-hold, low-stock, and out-of-stock 2021-02-15 16:41:14 -08:00
jonathansadowski ea7c6700bc
Merge pull request #29133 from woocommerce/fix/notice
Check if index value is set before accessing
2021-02-15 16:55:37 -06:00
barryhughes 8f74a25998 Remove esc_attr() (not an attribute, plus escaping is applied later in request) | #25510 2021-02-15 14:15:48 -08:00
barryhughes 1bd9a7e939 Only add '(optional)' to the billing_address_2 placeholder | #25510 2021-02-15 13:49:28 -08:00
Claudio Sanches 74bb66dc6d
Merge pull request #27671 from mahmoudsaeed/master
Make WC_Tax::get_tax_rate_classes() public
2021-02-15 14:31:25 -03:00
roykho 4fa0c81d11
Check if index value is set before accessing 2021-02-15 06:54:22 -08:00
hsing f333b373f6 Remove extra content wrapper 2021-02-12 17:50:48 -05:00
Claudio Sanches 7a71258257
Merge pull request #29094 from woocommerce/try/admin-menu-svg-icons
Use SVG and Dashicons instead of custom font for admin bar icons
2021-02-12 18:06:37 -03:00
Tyler Paulson 812976c65c Correct function summaries in the WC_Shipping_Rate class 2021-02-12 12:12:27 -05:00
Matt Sherman 6044f3e958 Update Products and Reports icons to use Dashicons instead of custom font 2021-02-12 10:37:23 -05:00
Nestor Soriano 4e195d5f3f Fix code sniffer errors. 2021-02-12 15:29:32 +01:00
Nestor Soriano 00d6dc40f7 Fix wrong caching of taxonomy in terms and attributes controllers.
The WC_REST_Terms_Controller and WC_REST_Product_Attributes_V1_Controller
classes have a get_taxonomy method that gets the name of the taxonomy
to process from a taxonomy id passed in the request, but once the
taxonomy name has been obtained it's cached and sbsequently reused.
The problem is that these controller instances are reused if more than
one request is processed programmatically, and thus the taxonomy that
was cached once is always used even if the new request specifies a
different taxonomy id.

The fix consists of using a dictionary of taxonomy id - taxonomy name
instead of one single taxonomy for caching.

In the case of WC_REST_Terms_Controller there's a protected $taxonomy
property that needs to be kept for compatibility, it's now set to
the last taxonomy name that has been introduced in the dictionary.
2021-02-12 15:12:58 +01:00
Takashi Kitajima 307a257781
Add translator comment #29008 2021-02-12 11:55:26 +09:00
Fernando Marichal 15424c99d6 Merchant email notes now are turned off by default
This commit turns off the merchant email notes by default
2021-02-11 14:15:17 -03:00
Matt Sherman 9f00fbfde1
Move admin menu manipulation from admin_head to admin_menu (#29088) 2021-02-11 11:48:36 -05:00
Roy Ho 2641bb7b6f
Merge pull request #28627 from woocommerce/update/tracks/global-props
Tracks: Add woo version as global track prop.
2021-02-11 05:48:25 -08:00
Néstor Soriano 9105910234
Merge pull request #28950 from woocommerce/exporter_product_type_filter
Add filter to allow third-parties to filter exportable product types
2021-02-11 14:32:17 +01:00
Vedanshu Jain 5a707f3e74
Merge pull request #28849 from woocommerce/fix/27521-2
Verify country code on checkout
2021-02-11 18:59:04 +05:30
Roy Ho 78851e6945
Merge pull request #28980 from leewillis77/add/add-generation-date-to-status-report
Add time of generation to the system status report
2021-02-11 05:09:03 -08:00
Nestor Soriano fae00e2bdf Make the refunds creation REST API behave more as documented
- Allow the list of line items to be a non-associative array
  where each item is identified by an "id" field
- Same for taxes inside line items, specify amount to refund in
  a "refund_total" key as in the case of line items
- Allow "quantity" keys as synonyms of "qty"

Also calculate "amount" automatically if missing and when all the
line items and taxes have a valid "refund_total" key.
2021-02-11 09:51:13 +01:00
Roy Ho 986b4fe0b9
Merge pull request #29089 from woocommerce/fix/issue-29087
Type cast floats to prevent string addition errors in PHP 8 closes #2…
2021-02-10 19:16:53 -08:00
Claudio Sanches 69c5d428a2
Merge pull request #29095 from woocommerce/fix/conditional-wc-admin
Check if WC Admin is active before showing message
2021-02-10 19:45:34 -03:00