jonathansadowski
53c22ba4e4
Merge pull request #27508 from woocommerce/fix/27419
...
Fix filter by attribute widget now working for "Any..." attributes
2020-09-02 13:32:54 -05:00
Nestor Soriano
53351fcc2f
Update wc_product_attribute_uasort_comparison to accept null entries
...
When set_attributes is used on WC_Product to remove existing attributes
the wc_product_attribute_uasort_comparison ends up being called
with a null argument, and this breaks tests in PHP 7.4 since
null is used as an array. This commit modifies the function so that
if null is passed no array access is attempted.
2020-08-31 16:49:29 +02:00
Claudio Sanches
5240682f38
Improve choice of words
2020-08-25 18:03:03 -03:00
Nestor Soriano
29cf161415
Small changes after review feedback:
...
- Method and class renames.
- Removed unnecessary autoloader registration.
- Add a unit test for classes with non-object type hints
in constructor arguments.
2020-07-24 09:24:06 +02:00
Nestor Soriano
d5d02a7175
Fix code sniffer errors in wc-core-functions.php
2020-07-24 09:23:05 +02:00
Claudio Sanches
1de6bf0c28
Merge pull request #26515 from koko-ng/patch-1
...
Fix error message in wc_get_template
2020-07-01 13:27:05 -03:00
Claudio Sanches
4d2bafcc49
Merge pull request #26219 from woocommerce/fix/wc-load-cart
...
`wc_load_cart` should load it's own dependencies and include required core files
2020-07-01 13:10:04 -03:00
Ron Rennick
dd5cd361bc
introduce wc_set_template_cache(), wc_clear_template_cache()
2020-06-11 14:06:56 -03:00
Claudio Sanches
9d8af073cf
Update since tag to 4.3.0
2020-05-29 13:45:00 -03:00
Peter Fabian
2394da73b4
Merge branch 'master' into refactor/23783
2020-05-28 11:19:03 +02:00
Albert Juhé Lluveras
9a34c4fe75
Update WC shipping settings so no shipping zones banner appears when all are deactivated
2020-05-15 16:32:12 +02:00
Albert Juhé Lluveras
973e50ab64
Add param to wc_get_shipping_method_count()
2020-05-15 11:22:28 +02:00
Albert Juhé Lluveras
de7ca06b41
Set is_enabled=1 instead of is_enabled=true
2020-05-15 11:02:12 +02:00
Albert Juhé Lluveras
33b0bef8c5
Add is_enabled=true check in wc_get_shipping_method_count()
2020-05-15 11:02:12 +02:00
koko
54db5f07c4
Fix error message in wc_get_template
...
If the filtered template does not exist the error should report the filtered template, not the original
2020-05-14 17:10:06 +02:00
Claudio Sanches
8e21f10b3d
Update since tags
2020-05-06 14:07:46 -03:00
Mike Jolley
88c7ad1bd2
Don't "get" cart
2020-04-20 12:47:20 +01:00
Mike Jolley
232ae16940
Load dependencies in wc_load_cart
2020-04-20 12:30:44 +01:00
Christopher Allford
2fedf9306e
Corrected the filter prefix for get_path_define_tokens
2020-04-07 10:25:57 -07:00
Christopher Allford
b43ad106ef
Added WPMU_PLUGIN_DIR and removed the path define token for ABSPATH
...
There's no need for the ABSPATH define since the WC plugin is always a child of a plugin directory anyway.
2020-04-06 07:17:01 -07:00
Christopher Allford
a7c0dec33a
Added a function to fetch all of the path define tokens that may be present in template paths
2020-04-05 13:21:50 -07:00
Christopher Allford
33e81654a9
Made the path tokenization deterministic
...
Since the tokens are replaced in a first-discovered first-replaced order, we may accidentally create tokenized paths like '{{ABSPATH}}/test' instead of the desired '{{WP_CONTENT_DIR}}test'. By ordering them according to specificity however, we ensure that we tokenize as much of the path as possible.
2020-04-05 12:41:39 -07:00
Christopher Allford
e270dfce2e
Extracted the template path tokenization so that it can be applied to more than one define more readily
2020-04-05 12:06:04 -07:00
Christopher Allford
91c608f38e
Merge branch 'master' into refactor/23783
2020-04-05 10:55:00 -07:00
vedanshujain
8f3d8f0495
Also cache with WC_ABSPATH to account for when WC is out of ABSPATH.
...
We already substitute ABSPATH with {{ABSPATH}} token to make sure that exact template path is not cached to support deployment with multiple servers.
This patch also add tokenizing WC_ABSPATH to account for when WooCommerce is installed outside of ABSPATH.
2020-03-30 18:05:13 +00:00
Vedanshu Jain
e35aaf1cff
Merge pull request #25885 from grigorijurasov/master
...
Change Serbian currency symbol from дин. to рсд, solves #25441
2020-03-17 19:02:17 +05:30
Rodrigo Primo
9b6d66cf1f
Merge pull request #25609 from SamirMahmudzade/patch-3
...
Update KZT (₸) symbol wc-core-function.php
2020-03-06 11:36:11 -03:00
grigorijurasov
06f44f386b
Update wc-core-functions.php
2020-03-05 18:41:14 +01:00
Rodrigo Primo
05cfc7eece
Add @since tag to get_woocommerce_currency_symbols()
...
See #25733
2020-03-04 16:26:07 -03:00
Rodrigo Primo
62d3a1fa44
Fix typo
2020-03-04 16:25:33 -03:00
Rodrigo Primo
c529273973
Merge pull request #25733 from TimBHowe/fix/25732
...
Added the get_woocommerce_currency_symbols function to allow develope…
2020-03-04 16:23:50 -03:00
TimBHowe
34bec7d839
Added the get_woocommerce_currency_symbols function to allow developers to get an array of all the currency symbol registered with woocommerce
2020-02-23 13:51:19 -05:00
SamirMahmudzade
443429bd14
Update KZT (₸) symbol wc-core-function.php
...
Update the Kazakhstani tenge symbol KZT (₸) symbol wc-core-function.php
2020-02-07 18:23:36 +04:00
Peter Fabian
06d0bbefc4
Don't run setup wizard redirects from AS.
2020-02-07 00:20:42 +01:00
Christopher Allford
c5e1fc6c45
Merge remote-tracking branch 'origin/master' into refactor/add-jetpack-constants
2020-02-03 11:50:16 -08:00
Christopher Allford
1d1413b4ee
Replaced direct access of many constants with the Constants library
2020-01-31 22:18:47 -08:00
Christopher Allford
8a046ab0cd
Cleaned up the template path replacement and fixed the wc_cache_set positioning
2020-01-30 16:24:07 -08:00
Christopher Allford
e86efca828
Merge branch 'master' into refactor/23783
2020-01-30 13:29:21 -08:00
Christopher Allford
6ad091a9b7
Changed all of the constant accesses into corresponding Automattic\Jetpack\Constants usages
2020-01-28 21:21:29 -08:00
Rodrigo Primo
b7aee86b2c
Remove hash_equals() polyfill that is no longer needed
...
This polyfill was added back in 2015
(1f62a53e0e
). WP includes the same polyfill
since version 3.9.2 and WC requires WP >= 5.0
(7d672c38a4
). So we don't need to maintain our own version of this function anymore.
2020-01-23 14:36:37 -03:00
Claudio Sanches
5c169bf54c
Fixed default value for wc_get_customer_default_location()
2020-01-21 11:53:45 -03:00
Christopher Allford
82cecbc6e8
Merge branch 'master' into refactor/23783
2020-01-16 17:18:23 -08:00
Rodrigo Primo
e963d7cfab
Fix minor imprecision in wc_is_wp_default_theme_active() documentation
2019-12-13 09:59:20 -03:00
Peter Fabian
72925ef41c
Centralize check for default themes.
...
This should make Storefront appear in the Setup Wizard again.
2019-12-11 18:35:04 +01:00
Rodrigo Primo
49b1294494
Simplify and modernize wc_print_r()
...
Replaces a call to call_user_func_array() with argument unpacking using the spread operator.
2019-11-21 12:04:08 -03:00
Claudio Sanches
9b87f512d2
Return correct country key if default location not found
2019-10-23 14:27:11 -03:00
Claudio Sanches
3dec01ce38
Include note about follow Unicode CLDR recommendation
2019-09-03 12:46:44 -03:00
Marco Almeida
788893bafa
Update wc-core-functions.php
...
Add docblock about @return
2019-08-27 22:33:32 +01:00
Marco Almeida
14e3d762f7
wc_mail returning the same as $mailer->send
...
When using wc_mail, third-party developers should be able to get the value from $mailer->send so that can take measures if it returns false.
Closes #24504
2019-08-26 19:52:37 +01:00
Claudio Sanches
e50953bc24
Fixed Namibian currency symbol
2019-08-19 19:40:19 -03:00