Commit Graph

35151 Commits

Author SHA1 Message Date
rmalviya f22dbd53ff Parse attribute_id as int not string
In legacy API v3 for product attribute terms, the `$attribute_id` is
received as string, but is required as int for proper handling.
Use `absint` to make sure it is a valid int id and hence fix #24160.
2019-07-19 15:52:06 +05:30
MahdiY 040a617cd1 Add filter hook to get zone criteria 2019-07-19 09:35:04 +04:30
Claudio Sanches 488eefd7ec Don't allow before before_woocommerce_init 2019-07-18 23:43:32 -03:00
Claudio Sanches fd42c439f9 Prevent run wc_load_cart() before woocommerce_loaded 2019-07-18 23:34:13 -03:00
Claudio Sanches 2144cf21aa
Merge pull request #24194 from woocommerce/renovate/husky-3.x
Update dependency husky to v3.0.1
2019-07-18 23:09:49 -03:00
Claudio Sanches 284a5a3f57
Merge pull request #24195 from woocommerce/renovate/mocha-6.x
Update dependency mocha to v6.2.0
2019-07-18 23:09:35 -03:00
Claudio Sanches f8628d62db
Merge pull request #24196 from woocommerce/renovate/config-3.x
Update dependency config to v3.2.1
2019-07-18 23:09:19 -03:00
Claudio Sanches 5eb11ea77a Remove exception for PHP 5.2 2019-07-18 23:02:30 -03:00
Claudio Sanches 80f1e2fba2 Remove all support for PHP 5.2 in Travis 2019-07-18 23:01:14 -03:00
Claudio Sanches d09009261f Fixed UnitTests in PHP 5.6 2019-07-18 22:46:28 -03:00
Claudio Sanches 16041d9247 Fixed failing tests 2019-07-18 22:42:31 -03:00
Claudio Sanches 96c7255fc0 Fixed SpeedTrapListener include 2019-07-18 22:24:40 -03:00
Claudio Sanches 838dd31e00 Updated PHPUnit in Travis 2019-07-18 22:09:12 -03:00
Claudio Sanches 67212d1303 Updated PHPUnit to 7.5.14 2019-07-18 22:02:58 -03:00
Renovate Bot d015f9baa1
Update dependency config to v3.2.1 2019-07-18 22:30:59 +00:00
Renovate Bot 1a3d2fa280
Update dependency mocha to v6.2.0 2019-07-18 22:02:09 +00:00
Renovate Bot 3fc0e53387
Update dependency husky to v3.0.1 2019-07-18 21:29:42 +00:00
Rodrigo Primo 0e317ac82e Only add the image node to structured data if product has image
This commit adds a check to verify if a given product has a image before
adding the image node to the structured data output. If there is no
image, the image node should be omitted instead of display with `false`
as its value.
2019-07-18 10:24:42 -03:00
James Allan dd47170c7d Deprecate the woocommerce_before_cart_item_quantity_zero action
This action was removed in 921cc754b9.
It will need to be deprecated so third-parties are made aware the new alternative.
2019-07-18 11:18:21 +10:00
David Stone b2e262f6cc Add more specific errors for all product type which are unpurchasable 2019-07-16 17:14:02 -06:00
vedanshujain 6ab03e6acd Return early if post status is `auto-draft` to prevent fatal.
While creating an order, if we remove an item after adding, `pre_post_update` hook gets called. Since the order is not created yet, `$order->get_date_created()` will be null, and this will cause a fatal in the event tracker which checks for and tracks edit in order created date.

We now return early when order status is `auto-draft` to prevent these kind of errors.
2019-07-17 00:21:18 +05:30
David Stone 50d9c73809 Add more specific reason for why products cannot be purchased so plugin can custimize these messages 2019-07-16 12:49:50 -06:00
Claudio Sanches 1ada2e8491 Use "Go to the shop" in downloads 2019-07-16 15:32:10 -03:00
Gerhard Potgieter d034131781
Merge pull request #24171 from woocommerce/fix/checktextdomain-packages
Exclude package vendor folders from checktextdomain call
2019-07-16 18:59:43 +02:00
Gerhard 982da28730 Exclude package vendor folders from checktextdomain call 2019-07-16 18:55:29 +02:00
Claudio Sanches 4b5a7ed414
Merge pull request #24170 from woocommerce/release/3.7-beta.1
Update 3.7.0 Beta 1
2019-07-16 13:24:09 -03:00
Gerhard 651aa3dd48 3.7.0 Beta 1 2019-07-16 18:06:08 +02:00
Rodrigo Primo 7ff4eea38d
Merge pull request #24168 from woocommerce/fix/npm-audit-fix
NPM audit fix
2019-07-16 12:31:55 -03:00
Rodrigo Primo abf4d88aa4
Merge pull request #23264 from woocommerce/readme/3.7
[README] Rolling readme for 3.7
2019-07-16 12:27:36 -03:00
Rodrigo Primo bb0e323119 Merge branch 'master' into readme/3.7 2019-07-16 12:26:33 -03:00
Claudio Sanches fc2cf35ae9 NPM audit fix 2019-07-16 12:24:40 -03:00
Gerhard 40cf36fb29 Add missing changelog entry 2019-07-16 16:56:11 +02:00
Claudio Sanches 015a2d825c
Merge pull request #24165 from woocommerce/update/rest-api
REST API package version 1.0.3
2019-07-16 11:55:28 -03:00
Claudio Sanches 65a32cfc2f REST API package version 1.0.3 2019-07-16 11:36:10 -03:00
Rodrigo Primo 3da82b94c6
Merge pull request #24161 from woocommerce/update/template-versions-3.7
Bump template versions for 3.7
2019-07-16 09:35:12 -03:00
Gerhard 6ba23a01f8 Bump template versions for 3.7 2019-07-16 10:36:45 +02:00
Gerhard Potgieter fb0eb7e092
Merge pull request #24157 from woocommerce/fix/shorter-wccom-url-params
shorten in-app-purchase url param keys
2019-07-16 08:49:15 +02:00
Gerhard 3b53036a62 Clean up readme for 3.7 2019-07-16 08:45:04 +02:00
Chris Eich 354b248b28
Only count orders created via checkout in held stock qty
Plugins may create orders without the meta tag "_created_via"="checkout" for various purposes, e.g. a balance-due order for purchases via deposit, because only the deposit order should reduce stock on checkout. The SUMO Payment Plans plugin does exactly this, but core WC handles such orders inconsistently:
- wc_get_held_stock_quantity() counts their items against held stock, but
- wc_cancel_unpaid_orders() only cancels old orders with a meta tag of "_created_via"="checkout"

This PR fixes that inconsistency, which on my site was preventing a user from adding an in-stock product to her cart, just because a balance-due order for the same product was pending.

Workaround: clear the setting WC > Products > Inventory > Hold Time (default 60 minutes), which inhibits the use of wc_get_held_stock_quantity().
2019-07-15 21:59:02 -07:00
John 052a6c6489
Hide Vietnam's state field
When you choose the country 'Vietnam' from a woocommerce website, the state field is hidden. So I added to be hidden in this class too.
2019-07-16 02:23:59 +03:00
haszari 8c5eb16c78 shorten in-app-purchase url param keys 2019-07-16 08:30:19 +12:00
Claudio Sanches 1e992cfad7
Merge pull request #24156 from woocommerce/update/min-wp-version
Bump WP minimum version.
2019-07-15 15:16:02 -03:00
Gerhard 9a72ba5cab Bump WP minimum version. 2019-07-15 19:39:12 +02:00
Gerhard Potgieter 3958e347cd
Merge pull request #24123 from woocommerce/add/wccom-site-rest-api
Add WCCOM Site REST API
2019-07-15 19:34:14 +02:00
Gerhard 93bd887a28 Changelog 2019-07-15 19:32:49 +02:00
Claudio Sanches 1f77efae4b Don't use WP_REST_Server::get_raw_data() inside REST API endpoints 2019-07-15 13:30:17 -03:00
Claudio Sanches eac2d39edf Better naming for REST API endpoints 2019-07-15 13:19:03 -03:00
Claudio Sanches 3fd0eb7391 Merge branch 'add/wccom-site-rest-api' of github.com:woocommerce/woocommerce into add/wccom-site-rest-api 2019-07-15 13:13:53 -03:00
Claudio Sanches 396bbe4cf5 Fixed doc blocks and coding standards 2019-07-15 13:13:16 -03:00
Akeda Bagus 3f9bbf5a3b
Replace __DIR__ with WC_ABSPATH. 2019-07-15 23:07:34 +07:00