Commit Graph

31810 Commits

Author SHA1 Message Date
Fulvio Notarstefano aba51d4c76 [#23839] Use false arg in class_exists() 2019-06-06 09:56:30 +08:00
Renovate Bot a7a6581fd1
Update dependency husky to v2.4.0 2019-06-05 17:58:55 +00:00
Claudio Sanches e2a842e47d
Merge pull request #23862 from woocommerce/renovate/autoprefixer-9.x
Update dependency autoprefixer to v9.6.0
2019-06-03 20:12:23 -03:00
Jonathan Moore 9e8debd7ba
Avoid attempting to cache expired sessions
get_session() attempts to cache a session even if it is already expired.
The code used passes negative expiry seconds to wp_cache_add if the session expired in the past:
wp_cache_add( $this->get_cache_prefix() . $customer_id, $value, WC_SESSION_CACHE_GROUP, $this->_session_expiration - time() );

Depending on the caching layers used this will give errors in the logs such as:
ERR invalid expire time in setex in /var/www/html/wp-content/plugins/redis-cache/includes/predis/src/Client.php:370
as reported on: https://wordpress.org/support/topic/error-when-trying-to-get-a-get-a-cache-not-available/
2019-06-03 22:11:46 +01:00
Renovate Bot 562e0f0e94
Update dependency autoprefixer to v9.6.0 2019-06-03 18:44:50 +00:00
Ajay Ghaghretiya c9bcce3a31 #23850 Fixed the coupon usage limit issue when apply coupon from admin panel (#23851)
* fix the coupon usage limit issue

* fix the if condition for the usage limit

* fixed coding standard

* fix the if conditions for coupon usage limit per user
2019-06-03 10:47:32 -03:00
Claudio Sanches 15fa45af69 Merge branch 'master' of github.com:woocommerce/woocommerce 2019-06-02 18:32:56 -03:00
Claudio Sanches b43e6cd583 Fixed npm packages 2019-06-02 18:32:42 -03:00
Claudio Sanches 3a47453d68 Improve regex 2019-06-01 11:52:15 -03:00
Dan Wyman 7355fadfdd Tracker: fix review count.
Fixes #23848
2019-05-30 12:45:47 -07:00
Rodrigo Primo 3ea8162cff
Merge pull request #23838 from woocommerce/feature/23829
Introduced woocommerce_search_products_post_statuses filter
2019-05-29 14:48:46 -03:00
Fulvio Notarstefano ab1ba58128 [#23839] Do not throw an autoloader notice if following the notice recommendation 2019-05-29 12:47:26 +08:00
Claudio Sanches b5da70c74a Introduced woocommerce_search_products_post_statuses filter 2019-05-28 21:05:26 -03:00
Claudio Sanches 2f7ec9506f New tests for is_postcode with NL postcodes 2019-05-28 20:55:51 -03:00
Claudio Sanches e04e9ae521 Make NL postcode validation more flexible
Allows postcode without spaces and in lowercase.
2019-05-28 20:51:07 -03:00
Claudio Sanches 2e90e9ab65
Merge pull request #23743 from Sisanu/issue-23717-enhancement-hook
Implement the info & extra actions new filter for Product gallery
2019-05-28 18:22:33 -03:00
Claudio Sanches 2fdf6de827
Merge pull request #23764 from jorgept/patch-1
Update class-wc-countries.php
2019-05-28 18:19:41 -03:00
Claudio Sanches c28af404ad
Merge pull request #23814 from woocommerce/add/x-sendfile-file-filter
Add filters to file paths passed to the different xsendfile like backends
2019-05-28 17:41:49 -03:00
Jonathan Moore 5d6574a00a
rating optional = generate_product_data incorrect
If rating is not mandatory on comments, generate_product_data() produces incorrect output.
For example items with comments but no reviews are output with rating of zero which is getting flagged in google webmasters tools under the heading "Rating is missing required best and/or worst values".

The output google is objecting to is eg:
"aggregateRating":{"@type":"AggregateRating","ratingValue":"0","reviewCount":1}}

postmeta in this case is:
_wc_average_rating 0
_wc_rating_count 0.0
_wc_review_count 1

product lookup table is reporting
rating_count 0
average_rating 0.00

the meta is correct and reflected in the product object, it is the test that is wrong since
if $product->get_review_count() 
may be true even if there are no ratings.

This is solved by substituting get_rating_count() which has the correct number of ratings.
2019-05-28 07:38:07 +01:00
Rodrigo Primo 31affff196 3.6.4 changelog 2019-05-27 16:35:39 -03:00
Rodrigo Primo 3d12ec4ae2 Remove extra comma to prevent issues with older versions of IE
This commit simply removes an extra comma that was added in
52fced8d7a to prevent issues with older
versions of IE. I found this when running grunt to prepare the 3.6.4
release:

```
Running "jshint:all" (jshint) task

   assets/js/admin/meta-boxes-order.js
    413 |                    user_email : user_email,
                                                    ^ Extra comma. (it breaks older versions of IE)
```

We might want to add jshint to the pre-commit hook and to Travis.
2019-05-27 14:38:54 -03:00
Rodrigo Primo 000c95ea88
Merge pull request #23659 from woocommerce/add/wc-admin-install-nudge
Add wc-admin notice.
2019-05-27 12:29:43 -03:00
Rodrigo Primo ff1020a787
Merge pull request #23787 from woocommerce/fix/tracks-cookie-set-action
Tracks: set cookie on admin_init insead of wp_loaded
2019-05-27 12:16:27 -03:00
Rodrigo Primo 67663836c0
Merge pull request #23739 from woocommerce/fix/23737
Remove administrative message from refund reason
2019-05-27 12:12:07 -03:00
Rodrigo Primo ce6f6a6ddb
Merge pull request #23772 from woocommerce/fix/OBW-tracks-not-enabled
Tracks: Add check for OBW is-opting-in
2019-05-27 12:09:00 -03:00
Gerhard Potgieter b2ed079520 Manual orders coupon usage limits by email (#23775)
* Add functionality to wp-admin order to check for coupon usage based on email addresses, similar to how WC_Cart handles this seperately, included unit tests.

* Only do the coupon by email usage check if order is from a guest. Fix issue with unit test.
2019-05-27 11:45:29 -03:00
Gerhard f5c5ced6b8 Update Emogirifier library 2019-05-27 11:39:33 +02:00
Peter Westwood 4448235a16
Coding Standards: Add missing space. 2019-05-24 18:15:24 -06:00
Peter Westwood f70dcc6a01 Add filters to file paths passed to the different xsendfile like backends.
Different server configurations can require different paths to be sent and it isn't always possible for a plugin to know the correct path for a platform.
These filters will allow a hosting provider to install a platform level configuration via an `mu-plugin` to make sure things work in there configuration.
2019-05-24 17:10:17 -06:00
Claudio Sanches 3a79970289 Fixed a typo in customers endpoint 2019-05-24 15:34:25 -03:00
Claudio Sanches 61346720c7 Allow enforce password strength meter on checkout 2019-05-24 15:27:26 -03:00
Iulia Cazan f49cec5108 Coding standard updates 2019-05-23 08:58:13 +03:00
Claudio Sanches 17da960abe
Merge pull request #23137 from woocommerce/fix/23051
Change coupon amount field type based on coupon type
2019-05-22 21:19:03 -03:00
Claudio Sanches 15aa298585
Merge pull request #23159 from woocommerce/fix/23157
If orderby is used on static homepage, force query to be a page query
2019-05-22 21:17:01 -03:00
Claudio Sanches 464992a232 Fixed file version 2019-05-22 21:07:46 -03:00
Claudio Sanches dc35b89df7
Merge pull request #23178 from davidofug/master
Uganda Billing/Shipping address
2019-05-22 21:07:09 -03:00
Claudio Sanches 2802a1def1
Merge pull request #23360 from klauspaiva/fix-for-margin-on-email-header-image
Alignment of the image used in the email header
2019-05-22 21:05:14 -03:00
Claudio Sanches 77879de2cb
Merge pull request #23364 from xristos3490/master
Use high-resolution version of wp spinner
2019-05-22 21:01:50 -03:00
Claudio Sanches 793519137a
Merge pull request #23794 from woocommerce/update/23792
Introduce wc_load_cart to dynamically load the cart
2019-05-22 20:51:09 -03:00
Claudio Sanches 28d49031d3
Merge pull request #23695 from james-allan/calc-base-zip-city
Calculate base store taxes including the store's zip and city
2019-05-22 20:49:57 -03:00
Claudio Sanches 8ea6c7c80e
Merge pull request #23651 from woocommerce/update/register-rest-routes
Set register_rest_route override to TRUE in Blocks REST API
2019-05-22 20:49:15 -03:00
Claudio Sanches 359fd9d7d5
Merge pull request #23791 from woocommerce/fix/23630
Clear notices when calling cart-errors.php template
2019-05-22 20:40:21 -03:00
Claudio Sanches 91a8592ebb Fixed conditional logic 2019-05-22 20:16:10 -03:00
Claudio Sanches c92968582c
Merge pull request #23431 from dimadin/fix/remove-tax-rates-from-locale-info
Remove tax rates from locales information
2019-05-22 20:13:31 -03:00
Claudio Sanches 688d35e206
Merge pull request #23562 from benhuson/update/23558-related-product-order
Update/23558 Related product order
2019-05-22 19:59:25 -03:00
Claudio Sanches 3cc3565e61
Merge pull request #23774 from connorhu/patch-1
fixed availability schema protocol
2019-05-22 18:07:05 -03:00
Claudio Sanches b55d0c9fe3
Merge pull request #23793 from grey-rsi/rest-api-catch-exceptions
Catch WC_REST_Exception in hooks inside WC_REST_CRUD_Controller
2019-05-22 12:04:41 -03:00
Gerhard f6d9faa062 Introducde wc_load_cart to dynamically load the cart, this allows for functionality outside of frontend to initialise the cart. 2019-05-22 12:24:31 +02:00
sergey.r 98586f10f4 Catch WC_REST_Exception while calling do_action( "woocommerce_rest_insert_{$this->post_type}_object" 2019-05-22 13:00:34 +03:00
Gerhard 3a49e7a53b Clear notices after calling checkout/cart-errors.php to avoid duplicate notices on the cart page. cart-errors.php does not output notices but a general notice message yet error notices are still enqueued before calling the template. 2019-05-22 09:49:53 +02:00