Commit Graph

18463 Commits

Author SHA1 Message Date
Rodrigo Primo 0785f2b72a Bump default WC API version used when creating webhook
This commit bumps the default WC API version used when users are creating a new webhook. Before this change the default version would be v2, and after this change it is v3 which is the latest API version.

In the future we might want to create a method in WC_API class or somewhere else that returns the latest WC API version and use it in `includes/class-wc-webhook.php` instead of hard-coding the version number.
2019-04-25 11:41:31 -03:00
Peter Fabian abf1b7450d Save the product before calling wc_update_product_stock to ensure data consistency and set quantity in local copy after saving it to db in wc_update_product_stock.
wc_update_product_stock reads product from the db twice, so if it's out of sync, strange things are happening.
Also, changes dependant on stock status might get reverted if local copy of $product is not updated after wc_update_product_stock.
2019-04-25 14:57:08 +02:00
Claudio Sanches 79ff1b10e7 Stop removing backslash from passwords 2019-04-24 19:37:07 -03:00
Mike Jolley 036a91d20c
Merge pull request #23484 from woocommerce/update/marketplace-queue-handling
Marketplace queue handling - avoid recurring event
2019-04-24 17:00:40 +01:00
Mike Jolley 7795ac53ff
Merge pull request #23486 from woocommerce/fix/23475
Improved batching for _wc_rating_count lookup table
2019-04-24 16:37:00 +01:00
Mike Jolley 9776e346b3 cancel_all 2019-04-24 16:28:28 +01:00
Mike Jolley 1efcecddc5
Merge pull request #23469 from dfeuster/master
corrected anchor href from old codex to new location
2019-04-24 16:11:32 +01:00
Mike Jolley ac0229c68a
Merge pull request #23397 from oskosk/update/jetpack-tracks-client-library-filepath
Update Jetpack Tracks Client library reference to not have a hardcoded directory path.
2019-04-24 16:08:54 +01:00
Mike Jolley 9bf2081869
Merge pull request #23477 from woocommerce/fix/23466
Default category sorting order should be overwritten if defined by get_terms
2019-04-24 16:00:33 +01:00
Mike Jolley 37e362047c
Merge pull request #23483 from woocommerce/fix/23481
Correct postcode validation on account page
2019-04-24 15:57:05 +01:00
Mike Jolley 087f490b10
Merge pull request #23489 from woocommerce/fix/23414
update action scheduler to version 2.2.5
2019-04-24 15:48:58 +01:00
Mike Jolley e7ea67da03
Merge pull request #23399 from woocommerce/renovate/woocommerce-block-library-2.x
Update dependency @woocommerce/block-library to v2.0.1
2019-04-24 15:42:16 +01:00
Mike Jolley 0962b447f6
Merge pull request #23482 from woocommerce/fix/23473
Fix attribute matching in `get_attribute_taxonomy_name`
2019-04-24 15:40:13 +01:00
Mike Jolley 4518bff6b1
Merge pull request #23444 from woocommerce/fix/23443
Order webhook check order type args if we should skip
2019-04-24 14:57:07 +01:00
Mike Jolley 98dfb8e8c2
Merge pull request #23446 from woocommerce/fix/23439
Product list table shipping class tax_query
2019-04-24 14:56:00 +01:00
Mike Jolley c42750504d
Merge pull request #23377 from woocommerce/fix/23374
[3.6] Fix product class name theme conflict due to missing global
2019-04-24 14:54:34 +01:00
Mike Jolley 2810e6cdf3
Merge pull request #23451 from woocommerce/fix/23387
Array handling in `get_catalog_ordering_args` to prevent notices
2019-04-24 14:52:47 +01:00
Mike Jolley b2e428d4cc
Merge pull request #23455 from woocommerce/update/23388
During initial product lookup table generation, set an option
2019-04-24 14:51:47 +01:00
Mike Jolley fbdc06188a
Merge pull request #23449 from woocommerce/fix/23436
Wrap wc_terms_clauses query in brackets to group meta_key where clause
2019-04-24 14:50:41 +01:00
Mike Jolley 9d9f7bec59
Merge pull request #23383 from woocommerce/update/update-notices
[3.6] More useful update notices if cron is disabled
2019-04-24 14:49:44 +01:00
Mike Jolley 3d2be7a63f
Merge pull request #23465 from woocommerce/fix/23403
Updated the meta_key for average rating when generating lookup tables.
2019-04-24 14:47:47 +01:00
Mike Jolley 7e091b2a0d
Merge pull request #23457 from woocommerce/fix/23407-2
Fixed use of get_term_meta in REST API endpoints
2019-04-24 14:34:28 +01:00
Mike Jolley ab5ff7576d
Merge pull request #23380 from woocommerce/fix/23378
Added missing wp_unslash to order data meta box save
2019-04-24 14:31:14 +01:00
Ron Rennick fc86e574cd update action scheduler to version 2.2.5 2019-04-24 10:08:06 -03:00
Mike Jolley 192fecc0d8 Remove filter only needs priority
Co-Authored-By: Dragoș Mocrii <dragosmocrii@users.noreply.github.com>
2019-04-24 13:54:12 +01:00
Mike Jolley 6176f565d7 Improved batching for _wc_rating_count lookup table 2019-04-24 13:37:15 +01:00
Mike Jolley 618e98f4e0 Avoid queue on init 2019-04-24 13:00:23 +01:00
Mike Jolley db67172b75 Queue single event only as needed 2019-04-24 13:00:16 +01:00
Mike Jolley c523c379b4 Correct postcode validation on account page 2019-04-24 12:23:48 +01:00
Mike Jolley 76f0c015dd Fix attribute matching in get_attribute_taxonomy_name 2019-04-24 12:05:44 +01:00
Mike Jolley f24a607842 Force delete rather than trash variations on product type change 2019-04-24 11:16:41 +01:00
Mike Jolley 121f06b030 Added way of telling if default is in use or not 2019-04-24 10:39:00 +01:00
oskosk 120fdb2028 Use jetpack_require_lib_dir() instead of JETPACK__PLUGIN_DIR 2019-04-23 20:40:25 -03:00
Daniel Feuster dfe8ac43bf corrected anchor href from old codex to new location 2019-04-23 16:54:44 -05:00
Claudio Sanches 02863a2b00 Merge branch 'fix/23407' of https://github.com/strelkovk/woocommerce into fix/23407-2 2019-04-23 16:20:36 -03:00
Claudio Sanches eeb6f5d15c Revert changes on includes/api/class-wc-rest-product-categories-controller.php 2019-04-23 16:19:41 -03:00
Peter Fabian 24a5c70b5b Updated the meta_key for average rating when generating lookup tables. 2019-04-23 19:29:38 +02:00
Mike Jolley 04e51191c4 Pass $class 2019-04-23 18:06:09 +01:00
Mike Jolley 246596dec0 Put the post_class back to avoid breaking bw compat. Append core classes on top 2019-04-23 18:04:20 +01:00
Claudio Sanches 0fdf47294a Fixed use of get_term_meta in REST API endpoints
Part of #23408
2019-04-23 12:48:03 -03:00
Ron Rennick 130ebf95cd phpcs sniff fixes for class-wc-admin.php 2019-04-23 12:07:02 -03:00
Ron Rennick d2d342f30e disable export of scheduled action posts 2019-04-23 12:03:30 -03:00
Mike Jolley 57929f2b09 During initial lookup generation set option 2019-04-23 15:23:47 +01:00
Mike Jolley f20a48b1e4
Merge pull request #23417 from szepeviktor/patch-1
get_total_refunded should return a float
2019-04-23 14:18:30 +01:00
Mike Jolley 867f6ce7ad
Merge pull request #23418 from szepeviktor/patch-2
Refunds are WC_Order_Refund
2019-04-23 12:24:20 +01:00
Mike Jolley 6c36c71a65 Remove red styling 2019-04-23 12:10:07 +01:00
Mike Jolley 6589c04dab Merge branch 'update/update-notices' of https://github.com/woocommerce/woocommerce into update/update-notices 2019-04-23 12:01:18 +01:00
Mike Jolley 3cb3d5df4e Prevent tab causing extra white space 2019-04-23 12:01:13 +01:00
Mike Jolley 5c07e38641 Array handling 2019-04-23 11:53:07 +01:00
Mike Jolley 49f79c9593 Wrap wc_terms_clauses query with brackets 2019-04-23 11:14:50 +01:00
Gerhard 0f00eb9a79 Fix product list table shipping class tax_query 2019-04-23 11:19:07 +02:00
Gerhard 53cabdf5fe Include check for order type args when checking if webhook is valid resource. 2019-04-23 10:43:49 +02:00
Viktor Szépe b1476ba497
Fix coding style
in class-wc-order-refund-data-store-cpt.php
2019-04-22 23:05:34 +02:00
Rodrigo Primo ac70d1e9b2 Fix copy and paste error in code documentation 2019-04-22 11:43:09 -03:00
Milan Dinić 9c8327bdaa Do not use state for Serbia. 2019-04-21 22:43:47 +02:00
Viktor Szépe babb5ab18e
Refunds are WC_Order_Refund
props. @phpstan
2019-04-21 21:55:13 +02:00
Viktor Szépe 4e4dad0581
get_total_refunded should return a float
props. @phpstan
2019-04-21 21:36:31 +02:00
Milan Dinić 67cf3062c0 Add address format for Serbia. 2019-04-21 20:28:58 +02:00
strelkov 63d6ded7aa Fix for get categories endpoint
to get proper display mode, image and order

issue
https://github.com/woocommerce/woocommerce/issues/23407
2019-04-20 11:37:23 +02:00
Kelly Dwan 60752fd68b Build blocks from `@woocommerce/block-library` 2019-04-19 13:20:14 -04:00
oskosk d6c8c2f389 Rely on the JETPACK__PLUGIN_DIR to load the Jetpack Tracks client file 2019-04-19 12:24:29 -03:00
Mike Jolley 7ef1fd5ea6 More useful update notices 2019-04-18 20:06:17 +01:00
Mike Jolley 662af85bea cleanup and docs 2019-04-18 19:33:48 +01:00
Mike Jolley 7737fc5928 remove post_class and implement woocommerce_post_class 2019-04-18 19:27:00 +01:00
Mike Jolley d411f082d7 Added missing wp_unslash 2019-04-18 18:52:51 +01:00
Mike Jolley 3dc0fcb0c7
Merge pull request #23370 from woocommerce/fix/23368
Check isset rather than empty so cart title can be removed
2019-04-18 18:39:06 +01:00
Mike Jolley f703c959e4
Merge pull request #23372 from woocommerce/fix/is_request_to_rest_api
is_request_to_rest_api check wc endpoints only
2019-04-18 18:36:48 +01:00
Mike Jolley fbaaa319dd Use global product if null 2019-04-18 17:25:13 +01:00
Mike Jolley 0738b332fc
Merge pull request #23349 from woocommerce/add/structured-data-offercount
Adds offerCount to variable product's structured data.
2019-04-18 14:29:57 +01:00
Mike Jolley 9206d6f4dd
Merge pull request #23363 from woocommerce/fix/23361
Better iconv support handling in wc_ascii_uasort_comparison
2019-04-18 14:27:46 +01:00
Mike Jolley f0c30406a3 is_request_to_rest_api check wc endpoints only 2019-04-18 14:23:12 +01:00
Mike Jolley 1274136b32 Check isset rather than empty so cart title can be removed 2019-04-18 13:10:42 +01:00
Mike Jolley f306d3fc11
Merge pull request #23266 from woocommerce/fix/23234
Switch to subquery for sale product query
2019-04-18 12:36:22 +01:00
Mike Jolley b1ece1452c
Merge pull request #23365 from woocommerce/make-greece-state-optional
Make state/county optional for Greece
2019-04-18 12:17:44 +01:00
Mike Jolley e1e13dee91 merge conflict 2019-04-18 12:06:13 +01:00
Mike Jolley 2033a231a4 Update from master 2019-04-18 12:05:23 +01:00
Mike Jolley 8d5d7b2463 Update from master 2019-04-18 11:56:47 +01:00
Mike Jolley 44d129e452
Merge pull request #23334 from woocommerce/fix/23328
Revert selectWoo escaping change
2019-04-18 11:51:11 +01:00
Mike Jolley 3aff19afe7 version bump 2019-04-18 11:47:07 +01:00
Mike Jolley f66e523c5f
Merge pull request #23250 from Spreeuw/patch-7
Add $this parameter to email class filters
2019-04-18 11:35:51 +01:00
Mike Jolley ccc45852fc
Merge pull request #23272 from franticpsyx/optimize-get-available-variations
Prime post caches to reduce queries needed to populate variations data
2019-04-18 11:34:20 +01:00
Mike Jolley cafd81e6e5
Merge pull request #23329 from woocommerce/fix/23327
Non int value handling in wc_let_to_num
2019-04-18 11:30:57 +01:00
Mike Jolley ceefe98bd0
Merge pull request #23297 from dkjensen/master
Remove tags from product titles when building PayPal request URL
2019-04-18 11:23:55 +01:00
Gerhard c601d20b57 Fix alignment 2019-04-18 12:22:22 +02:00
Mike Jolley 5c91dac198
Merge pull request #23236 from woocommerce/fix/23219
Added is-active class to Orders when looking at individual order
2019-04-18 11:22:11 +01:00
Mike Jolley 2f850633a5
Merge pull request #23251 from woocommerce/fix/23239
CSV Import: Search for 'number' anywhere in cell, not just the end
2019-04-18 11:21:14 +01:00
thomas shellberg 6f4217e429 make state/county option for Greece 2019-04-18 12:21:06 +02:00
Gerhard 6026d2b9bf Typecast is sufficient enough 2019-04-18 12:20:59 +02:00
Mike Jolley 442ce26591
Merge pull request #23270 from jenkoian/fix-network-orders-widget
Bug - Fix for network orders widget when WooCommerce is network active.
2019-04-18 11:20:06 +01:00
Mike Jolley 180a0aaf8d
Merge pull request #23238 from woocommerce/fix/23224
Updated back to link for attribute terms.
2019-04-18 11:13:20 +01:00
Mike Jolley f0c5209f2b
Merge pull request #23249 from woocommerce/fix/23247
Avoid post update in `wc_update_product_stock`
2019-04-18 11:10:36 +01:00
Mike Jolley e7a6c51e61
Merge pull request #23201 from woocommerce/fix/23168
Add check for VAT exemption inside `display_prices_including_tax`
2019-04-18 11:03:52 +01:00
Mike Jolley b686150655
Merge pull request #23196 from woocommerce/fix/23195
Replace full stops before running through `parse_str`
2019-04-18 11:01:59 +01:00
Mike Jolley 19a1a7d7db
Merge pull request #23132 from woocommerce/fix/23127
Attribute renaming: Fix migration queries
2019-04-18 10:58:07 +01:00
Mike Jolley 262eef64f5
Merge pull request #23339 from woocommerce/fix/23337
Correctly handle images in v3 api
2019-04-18 10:55:24 +01:00
Mike Jolley e64e927aab
Merge pull request #23356 from leonaves/patch-1
Fix security check on email template preview page.
2019-04-18 10:51:01 +01:00
Gerhard f87df5c95a Swap flag around to ensure it tries TRANSLIT first, also silence notices should they pop up for some reason 2019-04-18 09:51:14 +02:00
Gerhard bedde9377c Better iconv support checking 2019-04-18 09:37:01 +02:00
Gerhard 10acd7a290 Use //IGNORE instead of //TRANSLIT due to it relying on server config which would ignore the flag and throw notices. 2019-04-18 09:26:39 +02:00
Leon Aves 60148d7f8f
Fix security check on email template preview page.
The nonce generated on the previous page was not being verified properly due to mismatched brackets (the second argument to wp_verify_nonce was not being passed).
2019-04-18 00:08:00 +01:00
Mike Jolley b697be51d4 Remove call to header_register_callback and revert to 3.5 cookie handling 2019-04-17 23:50:42 +01:00
Claudio Sanches 669542ed7d Adds offerCount to variable product's structured data 2019-04-17 14:04:52 -03:00
Timmy Crawford 763d3aec33
Merge pull request #23332 from woocommerce/fix/tracks-cookie-save
Set tracks cookie on wp hook instead on when calling record event.
2019-04-17 06:20:24 -07:00
Gerhard 9ad8ef56da Be sure to also print the wp script since the OBW does not include those by default in the footer. 2019-04-17 14:56:51 +02:00
Gerhard fee86cd8cd Move JS to woocommerce_setup_footer and do not output wp scripts. 2019-04-17 14:54:59 +02:00
Gerhard 5c7b069d17 Use wp_loaded for cookie set 2019-04-17 14:23:19 +02:00
Gerhard f65f7a6d59 Remove wc_setcookie usage in WC_Tracks_Client::get_anon_id 2019-04-17 14:20:21 +02:00
Mike Jolley 111684ef32 Correctly handle images in v3 api 2019-04-17 13:18:33 +01:00
Mike Jolley f18542aa71 remove slash from currency code string 2019-04-17 12:06:57 +01:00
Mike Jolley 4e50a8f6dd Escape strings passed to selectwoo 2019-04-17 12:02:20 +01:00
Gerhard 00e8aeef60 Use __CLASS__ instead of self 2019-04-17 11:51:07 +02:00
Gerhard c74df4ca11 Set tracks cookie on wp hook instead on when calling record event. 2019-04-17 11:39:50 +02:00
Gerhard 8ca0bd7b4d Add logic to wc_let_to_num to handle non int values, added unit tests to cover these scenarios 2019-04-17 10:30:49 +02:00
Mike Jolley 9863362de3
Merge pull request #23315 from woocommerce/update/changes-from-3.5.8
Merge changes from 3.5.8
2019-04-16 14:57:50 +01:00
Mike Jolley d959758abe
Merge pull request #23311 from woocommerce/replace-deprecated-function
Replace call to deprecated function delete_woocommerce_term_meta()
2019-04-16 14:57:05 +01:00
Mike Jolley 7efe831e72
Merge pull request #23308 from webdados/patch-2
Stop using update_woocommerce_term_meta on class-wc-rest-product-categories-controller.php
2019-04-16 14:55:52 +01:00
Rodrigo Primo 20e9701583 Bump selectWoo.full.js version 2019-04-16 14:33:31 +01:00
Gerhard 86ec50f359 Update all *_woocommerce_term_meta calls to *_term_meta calls 2019-04-16 12:14:51 +02:00
Rodrigo Primo a18c44d76e Replace call to deprecated function delete_woocommerce_term_meta()
This commit replaces a call to deprecated function `delete_woocommerce_term_meta()` with its replacement `delete_term_meta()`. `delete_woocommerce_term_meta()` was deprecated by 32ae0192e5 and all calls removed, but PR #22553 that was created about the same time added a new call to this function.
2019-04-15 15:33:27 -03:00
Timmy Crawford bf151aee3e
Merge pull request #23303 from woocommerce/fix/23232
Refactor #23300
2019-04-15 11:21:00 -07:00
Timmy Crawford 08c7bee019
Merge pull request #23295 from woocommerce/fix/23291
Check `get_plugin_data` exists in `WC_REST_System_Status_V2_Controller`
2019-04-15 11:18:41 -07:00
Timmy Crawford acc1600594
Merge pull request #23302 from woocommerce/remove/tracks-total-revenue
[3.6] Blocker - remove total revenue from Tracks events.
2019-04-15 11:17:51 -07:00
Timmy Crawford e12e4aaa25
Merge pull request #23304 from woocommerce/fix/link-all-variations
[3.6] Fix logic in link all variations
2019-04-15 11:16:22 -07:00
Timmy Crawford f735883c80
Merge pull request #23306 from JPry/issue_23305
Update Action Scheduler library to 2.2.4
2019-04-15 11:10:42 -07:00
Timmy Crawford 438d22762e
Merge pull request #23246 from franticpsyx/issue-23245
Introduce IN and NOT IN clauses in `WC_Product_Data_Store_CPT::search_products
2019-04-15 11:08:32 -07:00
Marco Almeida 1a251c82ad
Stop using update_woocommerce_term_meta
Stop using the update_woocommerce_term_meta helper function as it has been deprecated on 3.6.0
2019-04-15 17:54:19 +01:00
Jeremy Pry 745ebffbdd
Merge commit '98433d8c3095fa393389988d16e56fe1d302af63' into issue_23305
Updates the Action Scheduler library to version 2.2.4.

* commit '98433d8c3095fa393389988d16e56fe1d302af63':
  Squashed 'includes/libraries/action-scheduler/' changes from 4d221dc6d..f5643fe30
2019-04-15 10:47:01 -04:00
Mike Jolley 6c6785c844
Merge pull request #23269 from marcochiesi/patch-1
Added validation for Italian postcodes
2019-04-15 14:10:01 +01:00
Mike Jolley 1504f8af3e
Merge pull request #23011 from Tofandel/patch-2
Improve the speed of the admin dashboard by only updating transients once per class
2019-04-15 14:03:31 +01:00
Mike Jolley 58161c0ccc
Merge pull request #23122 from fpcuriosity/patch-1
Add taxonomy-specific classes to active filters widget
2019-04-15 13:31:35 +01:00
Mike Jolley c7412415e5
Merge pull request #23092 from woocommerce/fix/23089
Use version_compare for determining max version number
2019-04-15 13:29:29 +01:00
Mike Jolley 2152642146
Merge pull request #23152 from uok/patch-1
Format empty cart message as information notice
2019-04-15 13:27:17 +01:00
Mike Jolley 30129f00ff Fix issue in tests by disabling strict mode 2019-04-15 12:10:22 +01:00
Mike Jolley d0c6c54989 Moved link/create code to data store with new unit test
This code was not testable within ajax code, so moved to the data stores.
2019-04-15 11:59:57 +01:00
Gerhard 134f9c9c8e Fix PHPCS 2019-04-15 12:13:02 +02:00
Ralf 66540f1b5d Moved accessibility labels for checkout after woocommerce_checkout_fields filter 2019-04-15 12:09:33 +02:00
Jeff Stieler 13e40cdee7 Remove total revenue from Tracks events.
Query to calculate is far too expensive and doesn’t seem to ever get cached with large datasets.
2019-04-15 09:37:34 +02:00
David Jensen 9b58e68e85 Remove html tags from product name in request to PayPal 2019-04-12 12:36:30 -07:00
Mike Jolley 4e8342be38 Check get_plugin_data exists 2019-04-12 15:34:52 +01:00
Manos Psychogyiopoulos d4f8435106 Prime post caches before looping through variations
Should help when the AJAX variations threshold is set higher.
2019-04-11 10:59:34 +03:00
Ian Jenkins fa3637c4f1 Bug - Fix for network orders widget when WooCommerce is network active.
Network orders makes most sense when WooCommerce is installed as a
network wide plugin. This change fixes the widget when it is network
active.
2019-04-10 22:58:51 +01:00
Marco Chiesi e2dd7504d0
Added validation for Italian postcodes 2019-04-10 23:44:50 +02:00
Gerhard 96906d9efa PHPCS Fixes 2019-04-10 14:53:03 +02:00
Mike Jolley fe385c9f74 fix query by adding alias 2019-04-10 13:48:03 +01:00
Gerhard 8716c7451c PHPCS fixes 2019-04-10 14:29:40 +02:00
Mike Jolley 2e24cc7b0c Switch to subquery for sale product query 2019-04-10 12:43:22 +01:00
Mike Jolley dfcc5e16e5 update wording 2019-04-10 11:51:41 +01:00
Mike Jolley 945ff7958f
Merge pull request #23101 from woocommerce/update/23090
Add table ENGINE to system status report
2019-04-10 11:32:51 +01:00
Mike Jolley deaaa5d1d8 Remove two old moved-feature notices 2019-04-10 11:23:35 +01:00
Mike Jolley 91084f3e28 Add todo for legacy shipping notice 2019-04-10 11:23:04 +01:00