Commit Graph

16668 Commits

Author SHA1 Message Date
Claudiu Lodromanean bdf5c02f48
Merge pull request #21619 from woocommerce/fix/21571
Tweaks to unsupported theme handling and hidden preview button handling
2018-10-22 09:41:45 -07:00
Claudiu Lodromanean 6ebdffd615
Merge pull request #21617 from itowhid06/master
[REST API] pass missing $filter as parameter in legacy get_order_refund endpoints
2018-10-22 09:40:26 -07:00
Rodrigo Primo 8f04e09f26 Fix PHPCS violations automatically using phpcbf 2018-10-22 11:22:22 -03:00
Claudiu Lodromanean 9351d0c937
Merge pull request #21601 from woocommerce/fix/21534-2
Change wp_woocommerce_sessions before dbDelta() is called
2018-10-19 12:00:53 -07:00
Claudiu Lodromanean 14ea40cae0
Merge pull request #21614 from menakas/issue_21511
Trim the import file headers while reading
2018-10-19 11:16:28 -07:00
claudiulodro b49a9a5809 Tweaks to unsupported theme handling and hidden preview button handling 2018-10-19 10:49:58 -07:00
Towhidul Islam b68cef2062 [REST API] pass missing $filter as parameter in get_order_refund 2018-10-19 20:41:20 +06:00
Menaka S 566c57cc45 Trim the import file headers while reading 2018-10-19 16:43:52 +05:30
Claudio Sanches bd37853923 Improved review and reviewer_email 2018-10-18 18:53:16 -03:00
Claudio Sanches f3fdcd2ec0 Fixed order or collection params 2018-10-18 18:17:15 -03:00
Claudio Sanches 17a80c863e [REST API] Fixed product reviews schema and content 2018-10-18 18:13:21 -03:00
Claudio Sanches d987fb95b9 [REST API] Register data endpoints 2018-10-18 16:04:54 -03:00
Rodrigo Primo 12af00e38f
Merge pull request #21605 from woocommerce/fix/21578
Fix: WC_Product::get_image() should use $attr parameter
2018-10-18 14:34:02 -03:00
Claudiu Lodromanean c994956f03
Merge pull request #21573 from woocommerce/fix/21548
Simplified path check for CSV importer to cause less issues
2018-10-18 07:56:34 -07:00
Rodrigo Primo 6ed2ebb3ba Fix: WC_Product::get_image() should use $attr parameter
This commit fixes a issue that was introduced when WC_Product::get_image() was refactored in 64b589f032 that was making this method ignore what was passed in the $attr parameter.
2018-10-17 19:40:57 -03:00
Claudiu Lodromanean 59a863bc70
Merge pull request #21591 from JeroenSormani/master
Ensure wp_list_pluck() gets a array and not possibly null
2018-10-17 08:27:04 -07:00
Claudiu Lodromanean 8c6b7032c6
Merge pull request #21596 from woocommerce/fix/rest-api-v3-producs-schema
[REST API] Fixed schema stock_status on products endpoints
2018-10-17 08:25:12 -07:00
Claudiu Lodromanean 5ca9600a23
Merge pull request #21595 from woocommerce/fix/rest-api-v3-trashed-orders
[REST API] Ability to query orders from trash bin
2018-10-17 08:24:06 -07:00
Claudiu Lodromanean 6f32369144
Merge pull request #21594 from woocommerce/fix/rest-api-v3-order-refunds-schema
[REST API] Fixed schema for refunded_payment in order refunds endpoint
2018-10-17 08:11:16 -07:00
Rodrigo Primo 41d2e1cafd Change wp_woocommerce_sessions before dbDelta() is called
On PR #21245, I added a db update routine to change wp_woocommerce_sessions primary key from session_key char(32) to session_id bigint auto_increment as dbDelta() is unable to handle primary key changes (see https://core.trac.wordpress.org/ticket/40357). But I didn't realize that dbDelta() was actually trying to add a new primary key to the table without droping the old key first and this was generating the following error:

```
WordPress database error Multiple primary key defined for query ALTER TABLE wp_woocommerce_sessions ADD PRIMARY KEY  (`session_id`)
```

To prevent this error from happening, this commit moves the query that changes the primary key from db update routine to WC_Install::create_tables() so that it runs before dbDelta() is called.
2018-10-17 12:11:01 -03:00
Rodrigo Primo 0c77ea584b Revert "Do not try and create primary key using upgrade routine, dbdelta does that automatically. Just drop the key if it exists and add a new unique key."
This reverts commit d3e59b770b.
2018-10-17 11:20:39 -03:00
Rodrigo Primo 35bd8ba05d Revert "Do check on new key field instead and only run alter when not found."
This reverts commit a41df43cb0.
2018-10-17 11:20:27 -03:00
Claudio Sanches 2bcd4598f8 Fixed coding standards 2018-10-16 21:15:03 -03:00
Claudio Sanches a9b36a4e23 [REST API] Fixed schema stock_status on products endpoints 2018-10-16 21:12:49 -03:00
Claudio Sanches c6daf8287d [REST API] Ability to query orders from trash bin 2018-10-16 20:19:34 -03:00
Claudio Sanches 98c8bb3eda [REST API] Fixed schema for refunded_payment in order refunds endpoint 2018-10-16 19:20:53 -03:00
Claudio Sanches 0f1f91f90a [REST API] Fixed duplicated entry in orders notes schema 2018-10-16 19:07:58 -03:00
Claudiu Lodromanean 8e47d2afd5
Merge pull request #21575 from JoryHogeveen/patch-1
Validate multisite super admins before filtering editable roles & mapping capabilities
2018-10-16 11:23:42 -07:00
Claudiu Lodromanean 84ec31d3cc
Merge pull request #21588 from woocommerce/fix/21587
[REST API] Product downloads - Check if file ID is not empty and exists
2018-10-16 10:09:52 -07:00
JeroenSormani 7b4075f11a Ensure wp_list_pluck() gets a array and not possibly null 2018-10-16 18:53:31 +02:00
Claudio Sanches 63390c181d [REST API] Fixed schema for product's downloads
Download ID are generated with wp_generate_uuid4() for while now.
Also we allow users to manipulate it.
2018-10-16 13:19:41 -03:00
Claudio Sanches 00c1a9016a Check if file ID is not empty and exists
Closes #21587
2018-10-16 13:01:51 -03:00
Jory Hogeveen 481903d915
No need to continue parsing for shop manager if target user is an administrator 2018-10-16 14:11:36 +02:00
Jory Hogeveen 991ae6e7f2
Check super admin status before modifying editable roles 2018-10-15 23:53:29 +02:00
Jory Hogeveen 00e942d0b7
Check super admin status before mapping caps 2018-10-15 23:52:47 +02:00
claudiulodro ccdf6d0253 Simplified path check for CSV importer to cause less issues 2018-10-15 13:50:34 -07:00
Claudiu Lodromanean df55670bf0
Merge pull request #21503 from woocommerce/fix/21497
Add support for sanitizing arrays used when saving order item data
2018-10-15 11:37:02 -07:00
Claudiu Lodromanean f2d5b73617
Merge pull request #21569 from JoryHogeveen/patch-1
Stop using `current_user_can` for validation roles.
2018-10-15 10:22:47 -07:00
Claudiu Lodromanean 76ae5382a8
Merge pull request #21570 from woocommerce/fix/21542
Fix: Posted variation attribute values not recognized if "+" present
2018-10-15 10:02:46 -07:00
Claudiu Lodromanean fe2b969534
Merge pull request #21565 from Prospress/issue_21515
Issue 21515
2018-10-15 09:51:56 -07:00
Claudiu Lodromanean c3bf253a88
Merge pull request #21561 from woocommerce/fix/21534
Improve session table update routine
2018-10-15 09:47:41 -07:00
Claudiu Lodromanean a70618711b
Merge pull request #21560 from woocommerce/fix/21552
Products shortcode allow numeric term slug matching
2018-10-15 09:42:16 -07:00
Claudiu Lodromanean e4796cfa75
Merge pull request #21557 from jdeeburke/fix-memory-limit-byte-values
Fix some memory limit values not correctly converting to bytes
2018-10-15 09:17:27 -07:00
Claudiu Lodromanean d230b5e2e5
Merge pull request #21550 from woocommerce/update/geo-get-upload-dir
Use wp_get_upload_dir for geolite DB path
2018-10-15 09:15:46 -07:00
Jory Hogeveen 54036f8f38
Codestyle 2018-10-15 17:38:13 +02:00
Rodrigo Primo f53b696ddf Remove unnecessary call to urldecode()
This commit removes an unnecessary call to urldecode() as the superglobal $_REQUEST is already decoded by PHP (see http://php.net/urldecode). Calling urldecode() on a previously decoded value was causing the issue described in #21542.
2018-10-15 12:27:12 -03:00
Jory Hogeveen e5f934d0a9
Codestyle 2018-10-15 17:21:04 +02:00
Jory Hogeveen b85c142d97
Stop checking shop_manager role if the user also is an administrator 2018-10-15 17:15:53 +02:00
Jory Hogeveen dfbe5174ef
Stop using `current_user_can` for validation roles.
Fixes #21568
2018-10-15 16:48:16 +02:00
Ron Rennick 1ea2d79dd6 Merge branch 'master' into issue_21515 2018-10-15 11:00:14 -03:00