Commit Graph

17050 Commits

Author SHA1 Message Date
Claudio Sanches 53fa49b13a Removed non-existing WC_Product_Simple->set_date_created_gmt method
Closes #21660
2018-10-25 13:12:40 -03:00
Jeff Stieler b9b9f191e9 Setup wizard: store shipping label opt-in in options table, use for “activate” step feature list. 2018-10-25 11:43:13 -04:00
Kanishk 9bd4a8957f Purged plugin and theme cache so that the helper can detect locally installed plugins and themes 2018-10-25 15:27:04 +05:30
claudiulodro 874ee8895d Revert show shipping behavior change 2018-10-24 13:09:32 -07:00
claudiulodro 255877211a Dont default to gallery thumbnail size if flexslider disabled 2018-10-24 11:07:43 -07:00
amit.chauhan 8ea696f57a Fixed woocommerce_localisation_address_formats for country code IN file class-wc-countries.php and removed comment 2018-10-24 19:19:16 +05:30
amit.chauhan b753548df3 Fixed woocommerce_localisation_address_formats for country code IN file class-wc-countries.php 2018-10-24 18:32:59 +05:30
Jeff Stieler 950f0c4688 Setup wizard: remove mention of live shipping rates from “activate” step. 2018-10-24 08:57:09 -04:00
jamsheerkrd bb5df05920
Update abstract-wc-data.php
https://github.com/woocommerce/woocommerce/issues/21640
2018-10-24 14:05:49 +05:30
Keith Light f9cbcbece6 Amend `absint` to `esc_html` to allow for negative numbers in menu order 2018-10-23 20:51:14 +01:00
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
AlexeyKhmyrov 179d0fdc52 Issue #21406 Dimensions in RTL Languages are displayed incorrectly on single product pages.
Using '×' instead of 'x' in string '10 x 20 x 30 cm'
2018-10-22 11:29:07 -05:00
AlexeyKhmyrov a58e907994 Fixed coding standards 2018-10-22 11:27:01 -05: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 9b094fc74d Use $product->get_image_id() instead of has_post_thumbnail()
This commit replaces all instances where has_post_thumbnail() was used with $product->get_image_id(). This is a continuation of 64b589f032 and is needed to support the custom product tables plugin as has_post_thumbnail() relies on a post meta.
2018-10-18 09:28:20 -03: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
Steve Grunwell 550b309901 Merge branch 'master' into feature/sanitize-order-id-tests 2018-10-17 02:21:04 +00: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
Khan M Rashedun-Naby 439bd54ce5 The variable should be 0 rather than empty string 2018-10-16 14:23:43 +06:00
Khan M Rashedun-Naby 7940694ce4 Removed Unnecessary Variable. 2018-10-16 13:25:56 +06:00
Kathy Darling 61f4f4e298 add $product object to woocommerce_quantity_input_classes 2018-10-15 17:24:47 -05: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
Alex Kirk 3e7cf4be21
Fix typo revivew 2018-10-15 15:54:19 +02:00
Gerhard a41df43cb0 Do check on new key field instead and only run alter when not found. 2018-10-15 14:13:21 +02:00
Gerhard d3e59b770b 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. 2018-10-15 14:07:48 +02:00
Gerhard aa6a6f2b10 Refine numeric slug checking when using the products shortcode for attributes and categories. 2018-10-15 13:22:12 +02:00
Gerhard 48de1f6b97 Accommodate numeric slugs in the product shortcode attribute and category fields. 2018-10-15 12:49:56 +02:00
Jared Burke 4557108805 Fix some memory limit values not correctly converting to bytes 2018-10-15 01:26:45 -05:00
Kathy Darling 5c722a32e8 Add support for custom classes on quantity input with new woocommerce_quantity_input_classes filter 2018-10-13 22:22:17 -05:00
Mohammad Jangda 0590522180
Use wp_get_upload_dir for geolite DB path
By default, `wp_upload_dir` will "will create a subfolder in your Uploads folder corresponding to the queried month (or current month, if no $time argument is provided" (https://developer.wordpress.org/reference/functions/wp_upload_dir/).

This is not necessary in our case since all we want is the `basedir` value.

We're switching to `wp_get_upload_dir`, which is a wrapper for `wp_upload_dir` that turns of the folder create behaviour.
2018-10-13 01:27:45 -04:00
Ron Rennick ec44a36913 only include erasure tools link in erasure desc_tip when user has manage_privacy_options, escape the desc_tip 2018-10-12 21:49:05 -03:00
Claudiu Lodromanean 74693979db
Merge pull request #21531 from wayheming/master
Fix cart notice position
2018-10-12 08:57:54 -07:00
Claudiu Lodromanean e0d31107ea
Merge pull request #21523 from woocommerce/fix/21509
Fix DB log handler cleanup
2018-10-12 08:22:22 -07:00
Jesper V Nielsen 8799de8477
fix-missing-colon 2018-10-12 09:43:43 +02:00
Jesper V Nielsen 1e8692aeb1
allow-filtering-on-wiget-get_current_page_url
Allow for filtering on get_current_page_url() in widgets, to make it possible to extend the parameteres, and keep them.

If building some functionality, where wee work with the parameters in the url, they will be removed, when using the links produced by wc_widget - for example the layered nav, or the price range.

With the filter, we kan add out custom parameter, to the url generated by these widgets.
2018-10-12 08:53:46 +02:00
Claudio Sanches 2f7f514f14 Fixed coding standards 2018-10-11 13:31:37 -07:00
claudiulodro d1e9e85cbb Extra safety 2018-10-11 13:31:37 -07:00
claudiulodro c9c12c2518 Initial implementation 2018-10-11 13:31:37 -07:00
claudiulodro d5ac2e4dee Backwards compatibility handling 2018-10-11 13:31:34 -07:00
Claudio Sanches 09ed5fd152 Fixed coding standards 2018-10-11 13:31:34 -07:00
claudiulodro bd7d73a788 Extra checking to make sure log file is in log file directory 2018-10-11 13:31:34 -07:00
claudiulodro 87b81c94ae Better way of doing it 2018-10-11 13:31:34 -07:00
claudiulodro 3bbf05d025 Prevent deleting things outside the log dir 2018-10-11 13:31:34 -07:00
claudiulodro 5f2b915f18 Add filter for ease of extensions 2018-10-11 13:31:30 -07:00
claudiulodro 7ea4e7b1b5 Prevent role changing 2018-10-11 13:31:30 -07:00
claudiulodro d6144a769e Restrict shop managers to editing customers 2018-10-11 13:31:30 -07:00
claudiulodro 26b188569b Add filter for disabling file path check 2018-10-11 13:31:27 -07:00
claudiulodro acf8757636 Add path checking and fix bug 2018-10-11 13:31:27 -07:00
claudiulodro 7b19673dea Extra file type checking 2018-10-11 13:31:27 -07:00
claudiulodro b6f22d9950 Fix typo 2018-10-11 13:31:18 -07:00
claudiulodro afd24dea4b Add http(s) to // download urls 2018-10-11 13:31:18 -07:00
claudiulodro e53e21d65f Better variable name 2018-10-11 13:31:18 -07:00
claudiulodro 441fe32f0b Add filetype checking for all files located on the server 2018-10-11 13:31:18 -07:00
claudiulodro 989230f2b9 Refactor for increased safety 2018-10-11 13:31:18 -07:00
claudiulodro 88d506bac0 Dont do abspath file_exists check on urls that start with // since those are remote urls and not local urls 2018-10-11 13:31:18 -07:00
unknown 12279989bd Fix cart notice position 2018-10-11 15:47:35 +03:00
claudiulodro 7e17be74d9 Fix db log handler cleanup 2018-10-10 12:14:25 -07:00
AmanS 9d327ac52e WC Refund class older name 'WC_Refund' somehow left over in the function docblock. Corrected to WC_Order_Refund. 2018-10-10 00:28:15 +05:30
claudiulodro 91d2411aa9 Use wc_check_utf8 function 2018-10-05 15:58:50 -04:00
claudiulodro dfad1306de Revert sanitization function used for order item data 2018-10-05 15:46:49 -04:00
Frédéric Demarle 7c3ef6cc27 Fix missing punctuation mark a the end of the comments 2018-10-04 20:22:18 +02:00
Steve Grunwell 65cda44fe6 Add tests for wc_sanitize_order_id()
This commit adds four test cases (via a PHPUnit data provider) for the `wc_sanitize_order_id()` function.

While writing the tests, it was also discovered that the function was returning a *string*, not an integer as indicated by the DocBlock, so explicit type-casting was added.
2018-10-04 13:53:55 +00:00
Claudiu Lodromanean 96005a51c4
Merge pull request #21494 from woocommerce/fix/21484
Don't fire duplicate actions in shipping settings
2018-10-03 16:59:06 -04:00
Claudiu Lodromanean a5509f1c75
Merge pull request #21493 from woocommerce/fix/21430
Add `address_1` to shipping packages info
2018-10-03 16:57:40 -04:00
JD 0871ad8627
Update class-wc-webhook.php 2018-10-03 21:38:53 +01:00
claudiulodro 1716538617 Prevent duplicate actions from firing in shipping settings 2018-10-03 15:43:11 -04:00
claudiulodro 84e5de5eef Add address_1 to shipping packages info 2018-10-03 14:31:35 -04:00
JD b0b2b34884
Avoid treating HTTP 301 and 302 Codes as Failures
As per:

https://github.com/woocommerce/woocommerce/issues/21490

Change the definition of a Webhook Delivery Failure to exclude HTTP/301 and HTTP/302 responses. This allows webhook handlers (such as Google Apps Script) to avoid breaching failure limits and disabling webhooks.
2018-10-03 16:40:49 +01:00
Claudiu Lodromanean 543c63072d
Merge pull request #21461 from dgwatkins/master
The orderby=ID argument needs to be uppercase.
2018-10-03 10:13:53 -04:00
Claudiu Lodromanean 71ca7c45ad
Merge pull request #21452 from andgrankin/patch-2
Update documentation
2018-10-03 10:11:11 -04:00
Claudiu Lodromanean 2368c4d4a8
Merge pull request #21448 from dyszczo/bugfix/logger-instance-warning
Fix for warning in wc_get_logger when woocommerce_logging_class retur…
2018-10-03 10:05:25 -04:00
Claudiu Lodromanean ceccd62c91
Merge pull request #21456 from woocommerce/fix/21389
Add inline float style for email label to match order details styling
2018-09-28 08:26:33 -07:00
Claudiu Lodromanean f1a7792454
Merge pull request #21403 from woocommerce/fix/21294
Fix attributes bugs
2018-09-28 08:24:03 -07:00
Frédéric Demarle e20ce00101 Fix ajax responses not testable when calling wp_send_json_success in a try block 2018-09-28 13:42:51 +02:00
David Garcia Watkins d4484f3a4b The orderby=ID argument needs to be uppercase. 2018-09-27 19:51:10 +02:00
Claudiu Lodromanean c8bab001a9
Merge pull request #21410 from rnaby/fix/21395
Fix for issue #21395
2018-09-27 10:46:23 -07:00
Claudiu Lodromanean 9f77ef8526
Merge pull request #21455 from woocommerce/fix/20912
Change query to save session data
2018-09-27 10:39:46 -07:00
Claudiu Lodromanean 8b7ccf84ec
Merge pull request #21447 from woocommerce/fix/21392
Allow saving 0 as stock value when using quick edit
2018-09-27 10:37:13 -07:00
Claudiu Lodromanean f5d5cad65c
Merge pull request #21241 from woocommerce/fix/21226
Revise coupon logic and add tests.
2018-09-27 08:58:47 -07:00
Khan M Rashedun-Naby f1f3eee195 discussion_r219948141 and discussion_r219949290 fix 2018-09-27 12:41:45 +06:00
Gerhard Potgieter dd1d3b0c77 Make sure _stock is set and unslash value before using. Update PHPCS exclude rule to be more specific. 2018-09-27 08:02:12 +02:00
claudiulodro 4082222f7a Add inline float style for email label to match order details styling 2018-09-26 11:13:29 -07:00
Rodrigo Primo 734a9370be Change query to save session data
Use `INSERT ... ON DUPLICATE KEY UPDATE` instead of `REPLACE` in the query that saves session data. Doing this to prevent deadlocks in this table. For more information see https://github.com/woocommerce/woocommerce/issues/20912#issuecomment-420888726
2018-09-26 14:46:28 -03:00
Claudiu Lodromanean b338c14faf
Merge pull request #21445 from woocommerce/fix/21428
Output notices on woocommerce_before_customer_login_form
2018-09-26 09:34:26 -07:00
andgrankin 526e3826e8
Update documentation
Update documentation for methods set_coupon_discount_totals and set_coupon_discount_tax_totals
2018-09-26 22:43:17 +07:00
Gerhard Potgieter 14aea98d49
Merge pull request #21305 from woocommerce/fix/product-review-type
Save comment_type for product reviews
2018-09-26 13:35:05 +02:00
Gerhard Potgieter a365fb10e9
Merge pull request #21408 from woocommerce/fix/21269
Dont modify attributes orderby when ordering by name
2018-09-26 13:30:40 +02:00
Gerhard Potgieter 0d77d3a777
Merge pull request #21444 from woocommerce/fix/issue-21443
Remove 'order_again' query string to avoid multiple re-orders
2018-09-26 13:03:03 +02:00
dyszczo 7f5122d502 Fix for warning in wc_get_logger when woocommerce_logging_class returns valid logger instance 2018-09-26 12:56:59 +02:00
Gerhard Potgieter 9374e2e79a PHPCS fixes 2018-09-26 12:43:04 +02:00
Gerhard Potgieter 0428ea4f1e When quick edit saving stock, check for numeric value as empty returns true on 0 and you can set stock to 0. 2018-09-26 12:34:19 +02:00
Gerhard Potgieter 7a323c4a6d Output notices on woocommerce_before_customer_login_form 2018-09-26 11:32:19 +02:00
Boro Sitnikovski 82f3d6f3fb Remove 'order_again' query string to avoid multiple re-orders 2018-09-26 09:39:48 +02:00
Daniel Bitzer 2b57f95552
Add coupon object param to get coupon data filter
This makes it easier to manage virtual coupon objects created through the woocommerce_get_shop_coupon_data filter
2018-09-26 12:43:27 +09:30
Claudiu Lodromanean 6e8f995426
Merge pull request #21424 from thenbrent/update_action_scheduler
Update Action Scheduler to v2.1.0
2018-09-25 10:58:24 -07:00
Claudio Sanches 61f988db63
Merge branch 'master' into fix/product-review-type 2018-09-25 12:35:41 -03:00
Claudiu Lodromanean b424213554
Merge pull request #21416 from pierrebuet/master
Show the right size of placeholder image on single product page
2018-09-24 13:03:20 -07:00
Claudiu Lodromanean 2008b8e2b2
Merge pull request #21384 from woocommerce/fix/rest-api-order-statuses
[REST API] Updated order statuses slugs
2018-09-24 11:28:56 -07:00
Claudiu Lodromanean e597e16e33
Merge pull request #21346 from Spreeuw/patch-6
Fixes #21345
2018-09-24 11:28:01 -07:00
Brent Shepherd 6eddeaec50 PHPCS fixes 2018-09-24 11:43:46 +10:00
pierrebuet db3270a390 Show the right size of placeholder image on single product page
in the template for the product image, wc_placeholder_img_src() returns the thumbnail size of the image.
In order to use 'woocommerce_single' as size, the function needs to be corrected, so the function use the size and not a calculated array of sizes.  wc_get_image_size doesn't return an height for the woocommerce_single size. Further and since the image sizes are declared, there is no need to translate the size to an array.
2018-09-21 19:33:04 +02:00
Jeff Stieler 5fbbd38728 OBW: update to official ShipStation plugin slug. 2018-09-21 10:48:10 -06:00
Khan M Rashedun-Naby f979b43b25 Fix for issue #21395 2018-09-21 14:36:04 +06:00
claudiulodro fdef6b4c73 Dont modify attributes orderby when ordering by name 2018-09-20 12:32:06 -07:00
claudiulodro d7afce5f4c Update routine to set reviews comment type 2018-09-20 09:28:39 -07:00
claudiulodro 67d80c35d8 Update cache key to consistently work with all types of chars 2018-09-20 08:21:39 -07:00
XLPlugins e283eff149 Added new filter to modify order status during orders using cheque as a gateway. 2018-09-20 19:07:23 +05:30
Brent Shepherd 0c27837b2b Add cancel_all() to WC_Queue_Interface
And the WC_Action_Queue implementation of WC_Queue_Interface.

This avoids ambiguity between the behaviour of cancel(), which can
be confusing given it technically unschedules all actions for cron
or recurring actions, but only the next instance of a single action.
2018-09-20 15:42:24 +10:00
Brent Shepherd 32d3de3aa8 Use new as_ prefixed Action Scheduler functions 2018-09-20 15:39:56 +10:00
Brent Shepherd e45824a8c3 Update Action Scheduler to v2.1.0
Merge commit '3c610aec4ad1ebef9de8df1f4dae0097fcbf8469'
2018-09-20 12:16:26 +10:00
claudiulodro 178f98ff65 Fix attribute saving 2018-09-19 11:35:46 -07:00
Claudiu Lodromanean 3d2b0ab72b
Merge pull request #21333 from ediamin/conditional_check_for_float_type_product_meta
Ignore converting float meta value for registered post meta
2018-09-19 09:42:06 -07:00
Claudiu Lodromanean 9df1ded20f
Merge pull request #21353 from ediamin/fix/cron_interval_property_in_WP_Background_Process
Fix cron_interval property support in WP_Background_Process
2018-09-19 08:04:21 -07:00
Claudiu Lodromanean 2dad30c151
Merge pull request #21381 from woocommerce/fix/21264
Should check AND NOT IN array
2018-09-19 07:43:53 -07:00
Claudio Sanches 4ce8544478 [REST API] Fixed reports results 2018-09-18 12:14:17 -03:00
Claudio Sanches bd7a73696a [REST API] Updated order statuses slugs
All REST API does not include "wc-" prefix, removing here makes easy to
work with all endpoint without care about any prefix.
2018-09-18 11:27:26 -03:00
Claudio Sanches 48a0045373 [REST API] Fixed endpoints registered in /reports 2018-09-18 11:23:35 -03:00
Gerhard Potgieter 9849228442 Logical not bitwise operator 2018-09-18 15:11:26 +02:00
Trafikbyran b27980dae7 Update wc-template-functions.php
it's supposed to check if it isn't (&!) in the array of taxonomies that are stated on the following rows not if it is (&&)... before rows 623 to 630 did nothing..
one could argue that it should be possible to set the taxonomies in the array it checks "( 'product_cat', 'product_tag' )" in the filter but i haven't thought that through
2018-09-18 15:10:50 +02:00
Gerhard Potgieter 2f9ca949f7
Merge pull request #21336 from woocommerce/fix/21335
Triggering woocommerce_order_edit_status on single order status edit.
2018-09-18 12:43:33 +02:00
Gerhard Potgieter e69900a4d6 Shipping totals should show even if calculator is disabled. 2018-09-17 13:43:32 +02:00
Gerhard Potgieter c22c92b838 Introduce wc_sanitize_endpoint_slug and run all endpoint sanitization before saving through it to ensure that only valid slugs can be used for endpoints. 2018-09-14 09:35:49 +02:00
Gerhard Potgieter ed06fc5d01 Revert "Do not use camel case for password reset request subject and heading"
This reverts commit bd7f1a6a4d.
2018-09-14 09:23:06 +02:00
Gerhard Potgieter bd7f1a6a4d Do not use camel case for password reset request subject and heading 2018-09-14 09:15:23 +02:00
Edi Amin f1f03928f9 Fix cron_interval property support in WP_Background_Process 2018-09-14 09:29:48 +06:00
Ewout Fernhout 9c411dc532
Fixes #21345 2018-09-13 15:23:00 +02:00
Chris Shultz 2506ff250b Triggering woocommerce_order_edit_status on single order status edit. 2018-09-12 10:07:02 -07:00
Claudiu Lodromanean 7b1344e567
Merge pull request #21327 from woocommerce/feature/21119
[REST API] Allow apply and remove coupons in orders endpoint
2018-09-12 08:04:00 -07:00
Claudiu Lodromanean c3170b423b
Merge pull request #21328 from woocommerce/fix/21321
wc-checkout js params use is_checkout
2018-09-12 07:53:32 -07:00
Claudiu Lodromanean 07351d5e11
Merge pull request #21288 from woocommerce/update/humanize-emails
Humanize emails
2018-09-12 07:51:07 -07:00
Edi Amin 4725bb3e72 Ignore converting float meta value for registered post meta 2018-09-12 20:39:24 +06:00
Gerhard Potgieter 0dd12e0d05
Merge pull request #21243 from woocommerce/update/20991
Send emails for cancelled_to_* orders
2018-09-12 12:49:51 +02:00
Gerhard Potgieter 55b188ad8f
Merge pull request #21111 from woocommerce/fix/structured-data-breadcrumbs
Include URL for the last element in breadcrumb list
2018-09-12 12:45:23 +02:00
Gerhard Potgieter 5f7b833844 Add missing # before order numbers and escape properly 2018-09-12 12:24:27 +02:00
Gerhard Potgieter d7cb15c8f8 Update email copy based on https://github.com/woocommerce/woocommerce/pull/21288#issuecomment-420251277 2018-09-12 11:30:53 +02:00
Gerhard Potgieter 43e4ef85e0 Use is_checkout conditional instead of is_page for the wc-checkout js paramaters. 2018-09-12 08:38:54 +02:00
Claudio Sanches bfdd758bd4 Improve coupons logic and throw errors for invalid coupons 2018-09-11 18:26:32 -03:00
Claudio Sanches 8d9da1cb94 Created method to apply and remove coupons 2018-09-11 18:10:58 -03:00
Claudio Sanches fda3f6890c Fixed allow to remove coupons when using line item ID. 2018-09-11 17:18:59 -03:00
Claudiu Lodromanean 92c5c4e54e
Merge pull request #21326 from woocommerce/fix/rest-api-settings-schema
[REST API] Updated Settings schema since now we allow batch update
2018-09-11 13:16:36 -07:00
Claudio Sanches 2b7e5121f2 [REST API] Allow apply and remove coupons in orders endpoint
Closes #21119
2018-09-11 16:53:55 -03:00
Claudio Sanches ccd1e1ced6 Fixed coding standards 2018-09-11 16:53:41 -03:00
Claudio Sanches 0ab5dc3e5b [REST API] Updated Settings schema since now we allow batch update 2018-09-11 16:21:10 -03:00
Claudio Sanches 45c542aa8a [REST API] Fixed order notes schema 2018-09-11 15:53:13 -03:00
Claudiu Lodromanean 1411567177
Merge pull request #21312 from woocommerce/fix/21295
Fix encoded special chars in layered nav "Any %s" string.
2018-09-11 10:01:36 -07:00
Claudiu Lodromanean c60eb6a2f2
Merge pull request #21314 from woocommerce/add/20822
Add filter to control the restore refunded items chekbox default
2018-09-11 09:26:55 -07:00
Claudiu Lodromanean a9b635efb1
Merge pull request #21322 from woocommerce/update/tracker
Tracker changes
2018-09-11 09:17:04 -07:00
Gerhard Potgieter 6ff90a1912 Cleaner code and correct apply_filters 2018-09-11 12:50:20 +02:00
Claudio Sanches 61873627a7 Merge branch 'master' into feature/rest-api-v3 2018-09-10 19:16:22 -03:00
Claudio Sanches ead415e4b8 Check if comment_type is empty 2018-09-10 18:40:46 -03:00
Claudiu Lodromanean 48bf960a74
Merge pull request #21245 from woocommerce/fix/woocommerce-sessions-schema
Change wp_woocommerce_sessions primary key
2018-09-10 12:20:45 -07:00
Claudiu Lodromanean fe1acc0e8e
Merge pull request #21311 from woocommerce/update/21308
Sort by latest instead of Sort by newness
2018-09-10 10:27:43 -07:00
Claudiu Lodromanean ba0a989a38
Merge pull request #21306 from woocommerce/feature/21115
[REST API] Reports totals endpoints
2018-09-10 10:23:56 -07:00
Claudiu Lodromanean 75bac9f3c6
Merge pull request #21316 from woocommerce/fix/21120
Replaced in_stock with stock_status for v3 products endpoint.
2018-09-10 09:47:31 -07:00
Claudiu Lodromanean ac24982e92
Merge pull request #21304 from woocommerce/fix/customer-list-query
Fix customer list query
2018-09-10 09:42:01 -07:00
Claudiu Lodromanean f7028154a1
Merge pull request #21278 from woocommerce/fix/20989
Updated shipping class count and posts query to account for variations correctly.
2018-09-10 09:02:31 -07:00
Peter Fabian 17f9b601e9 Reverted more accurate counting of shipping class items as it could cause perf issues. 2018-09-10 16:23:06 +02:00
Gerhard Potgieter c572327ce9 Check if helper is connected to woocommerce.com 2018-09-10 15:47:46 +02:00
Gerhard Potgieter 1f2b028b0b Category counts 2018-09-10 15:35:44 +02:00
Gerhard Potgieter 58a2ae494d Review counts 2018-09-10 15:30:17 +02:00
Gerhard Potgieter f28002f257 Use wp_json_encode instead of esc_js. Hat tip @dtugend 2018-09-10 14:35:55 +02:00
Peter Fabian f80d628c56 Fixed omitted grandparent's prepare_objects_query for products endpoint. 2018-09-10 13:49:42 +02:00
Peter Fabian 1237e5ef7e Added enums to collection_params for stock_status. 2018-09-10 12:36:18 +02:00
Peter Fabian 0ddd8f4506 Fixed stock_status validation. 2018-09-10 12:32:01 +02:00
Gerhard Potgieter 16b2abe8cd Remove charset, WP will load site charset by default. We need to do esc_js first before wp_specialchars_decode to avoid esc_js to encode double quotes again. 2018-09-10 11:58:39 +02:00
Peter Fabian 70a4309d81 Replaced in_stock with stock_status for v3 products endpoint. 2018-09-10 11:53:20 +02:00
Gerhard Potgieter e3994348b3 Update checked functionality to use a filter, removed option from settings screen. Can use the woocommerce_restock_refunded_items filter to have the option checked or not, defaults to unchecked. 2018-09-10 11:31:24 +02:00
Ivete Tecedor 9b07180c7a #20822 -- adding config for making the "restock refunded items" checkbox be UNchecked by default 2018-09-10 11:27:14 +02:00
Gerhard Potgieter 6b3feb0417 Decode encoded special chars for Any string label used in the layered nav widget. 2018-09-10 10:49:25 +02:00
Gerhard Potgieter 8b51ceaca2 Sort by latest instead of Sort by newness 2018-09-10 10:26:04 +02:00
Claudio Sanches 14a1217218 Load all product types even when empty 2018-09-08 22:45:51 -03:00
Claudio Sanches 5f723fc0d9 Removed extra code 2018-09-08 22:40:27 -03:00
Claudio Sanches d199538514 Inserted data for /reports/reviews/count endpoint 2018-09-08 22:10:19 -03:00
Claudio Sanches 18f8a51cc7 Included @since tag 2018-09-08 21:53:57 -03:00
Claudio Sanches c18d3c3fff Save comment_type for product reviews 2018-09-08 21:47:49 -03:00
Claudio Sanches 6d54a533ae Fixed customer list query 2018-09-08 21:21:00 -03:00
Claudio Sanches d2b0ff0f32 Initial /reports/reviews/totals endpoint 2018-09-08 21:19:57 -03:00
Claudio Sanches 2fcabfe7e6 /reports/coupons/totals endpoint 2018-09-08 21:04:13 -03:00
Claudio Sanches daf6650d5d /reports/customers/count endpoint 2018-09-08 20:32:39 -03:00
Claudio Sanches a0145c0265 Fixed schema to include instance_id for shipping_lines 2018-09-08 19:12:40 -03:00
Claudio Sanches 30a2e87cf5 Fixed schema to include instance_id for shipping_lines 2018-09-08 19:10:45 -03:00
Claudio Sanches ca36e368c5 Added /reports/products/totals endpoint 2018-09-08 19:02:29 -03:00
Claudio Sanches 5d67b474ed Load product types 2018-09-08 19:02:22 -03:00
Claudiu Lodromanean 0cc137be1e
Merge pull request #20848 from woocommerce/fix/20844
Make wc_get_attachment_image_attributes do what it is suppose to.
2018-09-07 12:08:34 -07:00
claudiulodro 08a76e1eea Add srcset handling 2018-09-07 11:36:03 -07:00
Claudiu Lodromanean 2da0c5715c
Merge pull request #21292 from woocommerce/fix/21091
Tax display in cart now depends on whether customer is tax exempt.
2018-09-07 11:01:42 -07:00
Gerhard Potgieter dccc0d5461 Restore space 2018-09-07 10:33:20 +02:00
Gerhard Potgieter 3b57bf7051 Fix invoice escaping 2018-09-07 09:54:31 +02:00
Gerhard Potgieter ace541910d Shopping not shipping :) 2018-09-07 09:03:47 +02:00
Gerhard Potgieter e2a83bb4e7 Update footer text to show on new line 2018-09-07 08:31:27 +02:00
Claudiu Lodromanean d9b5cf7b6f
Merge pull request #21244 from rubn-g/fix/variable-product-cache-miss
Fix/variable product cache miss
2018-09-06 15:17:27 -07:00
Ruben 0a0f733a6e
fix lint code style issue 2018-09-06 22:52:48 +02:00
Claudiu Lodromanean 5ee82ce9c0
Merge pull request #21270 from jessepearson/add/system-tools-action
Add action for when system tools are run
2018-09-06 13:17:09 -07:00
Claudiu Lodromanean 552adaae13
Merge pull request #21274 from woocommerce/fix/21215
Improve performance of the query to delete version transients
2018-09-06 12:48:28 -07:00
Claudiu Lodromanean d6cbf78825
Merge pull request #21193 from woocommerce/add/21182
Add hidden, screen-reader label on address line 2 input on checkout
2018-09-06 10:32:36 -07:00
Claudiu Lodromanean dbbf31c99d
Merge pull request #21234 from woocommerce/update/obw-shipping-step-fulfillment
OBW: Remove live rates from shipping step, promote label printing.
2018-09-06 10:31:02 -07:00
Peter Fabian cf3f54ec64 Made tax display in cart depend on whether customer is tax exempt. 2018-09-06 17:40:21 +02:00
Jeff Stieler 1dc6a1c66d OBW: fix PHPCS errors. 2018-09-06 09:13:58 -06:00
Gerhard Potgieter 866aab0ead New accout email copy changes 2018-09-06 14:38:43 +02:00
Gerhard Potgieter cf03db7392 Update customer reset password email copy 2018-09-06 14:18:09 +02:00
Gerhard Potgieter 68b5fbe279 Customer note email copy changes 2018-09-06 13:58:56 +02:00
Gerhard Potgieter 9361aaa05b Update invoice emails copy 2018-09-06 13:48:40 +02:00
Gerhard Potgieter fac659c9c6 Update refunded emails copy 2018-09-06 13:24:28 +02:00
Gerhard Potgieter 84b935490d Update completed email copy 2018-09-06 13:11:58 +02:00
Gerhard Potgieter 5eaa6da98b Update processing emails copy 2018-09-06 13:00:21 +02:00
Gerhard Potgieter 697e3229f2 Update on-hold emails copy 2018-09-06 12:48:39 +02:00
Gerhard Potgieter b03e5cff45 Failed admin email changes 2018-09-06 12:30:33 +02:00
claudiulodro 52e272c807 Add breadcrumb links for product categories and tags 2018-09-05 13:32:53 -07:00
Claudio Sanches 017b44693b Updated names 2018-09-05 10:30:14 -03:00
Claudio Sanches f13deab00a /reports/orders/count 2018-09-05 10:28:22 -03:00
Claudio Sanches 25ed037fb0 Include new reports endpoints results 2018-09-05 09:36:19 -03:00
Claudio Sanches 9fd386155f Allow to easy manipulate /reports endpoint results 2018-09-05 09:28:58 -03:00
Claudio Sanches f0e6ec7a6c Register reports 2018-09-05 09:25:56 -03:00
Claudio Sanches c271fca508 Restored reports endpoints 2018-09-05 09:24:02 -03:00
Jesse Pearson fe7817163c Moved action call 2018-09-05 07:34:52 -04:00
Peter Fabian 2ba13d06fd Fixed PHPCS. 2018-09-05 11:38:14 +02:00
Peter Fabian 43e3957bd5 Switched the variations to parent products to fix product counts for shipping classes. 2018-09-05 11:37:11 +02:00
Peter Fabian ab4630111b Fixed posts query to include parent products if variations have the shipping class assigned. 2018-09-05 11:35:05 +02:00
claudiulodro 1afde50ed6 Generate URLs for singles in structured data 2018-09-04 13:36:10 -07:00
Rodrigo Primo b4b7062d7b Improve performance of the query to delete version transients
This commit removes the `ORDER BY option_id` part of the query to remove the version transients from the `wp_options` table. This change should help users having performance issues with this query (see for example #21215) and, as far as I can see, ordering is not necessary in this context.

Removing the `ORDER BY` from the query means that MySQL won't have to use filesort:

```
MySQL [wccore]> explain DELETE FROM wp_options WHERE option_name LIKE '\\_transient\\_%1510258328' ORDER BY option_id LIMIT 1000;
+----+-------------+------------+------------+-------+---------------+-------------+---------+-------+------+----------+-----------------------------+
| id | select_type | table      | partitions | type  | possible_keys | key         | key_len | ref   | rows | filtered | Extra                       |
+----+-------------+------------+------------+-------+---------------+-------------+---------+-------+------+----------+-----------------------------+
|  1 | DELETE      | wp_options | NULL       | range | option_name   | option_name | 766     | const |   67 |   100.00 | Using where; Using filesort |
+----+-------------+------------+------------+-------+---------------+-------------+---------+-------+------+----------+-----------------------------+
1 row in set (0.02 sec)

MySQL [wccore]> explain DELETE FROM wp_options WHERE option_name LIKE '\\_transient\\_%1510258328' LIMIT 1000;
+----+-------------+------------+------------+-------+---------------+-------------+---------+-------+------+----------+-------------+
| id | select_type | table      | partitions | type  | possible_keys | key         | key_len | ref   | rows | filtered | Extra       |
+----+-------------+------------+------------+-------+---------------+-------------+---------+-------+------+----------+-------------+
|  1 | DELETE      | wp_options | NULL       | range | option_name   | option_name | 766     | const |   67 |   100.00 | Using where |
+----+-------------+------------+------------+-------+---------------+-------------+---------+-------+------+----------+-------------+
1 row in set (0.00 sec)
```
2018-09-04 17:20:35 -03:00
Rodrigo Primo b7cc3077ca Remove unneeded usage of @codingStandardsIgnoreStart 2018-09-04 16:03:02 -03:00
Jesse Pearson 2faadce24f Add action for when system tools are run 2018-09-04 09:33:16 -04:00
Claudio Sanches 6a3483fa8a [REST API] Make product's created date editable 2018-09-03 10:57:28 -03:00
Rodrigo Primo 2740a686dc Change wp_woocommerce_sessions primary key
This commit changes wp_woocommerce_sessions primary key to the bigint field session_id. Before it was the char(32) field session_key. Doing this change primarily as it should reduce the occurrence of deadlocks, but also because it is not a good practice to use a char(32) field as the primary key of a table.
2018-08-31 16:56:30 -03:00
Ruben 081125043d
wordpress coding standards 2018-08-31 19:12:12 +02:00
Ruben d0db74edd5
Fix variable product cache misses
If the child product doesn't have weight or dimensions, the value is not being cached correctly as a ```false``` value is being stored and it always recheck that on every page load.
2018-08-31 19:10:32 +02:00
claudiulodro 33154afd03 Send emails for cancelled_to_* orders 2018-08-31 09:31:16 -07:00
claudiulodro e24aa057ad Revise coupon behavior and add unit tests 2018-08-31 08:35:41 -07:00
Jeff Stieler 412a3fb17f OBW: render the product dimension and weight units selection inline in a sentence. 2018-08-30 15:36:08 -06:00
Jeff Stieler b3532dc4de OBW: hook up WCS / ShipStation install in shipping step save handler. 2018-08-30 15:36:08 -06:00
Jeff Stieler c179f7c5c6 OBW: remove live rates method setup from shipping step save handler. 2018-08-30 15:36:08 -06:00
Jeff Stieler fde57ab5d9 OBW: recommend either WCS or ShipStation (based on location) for label printing on shipping step. 2018-08-30 15:36:08 -06:00
Jeff Stieler 2a243915f1 OBW: remove now defunct WCS shipping carrier by country helper function. 2018-08-30 15:36:08 -06:00
Jeff Stieler 23e0174c19 OBW: add information about live rate extensions to shipping step.
This commit also refactors the script/style enqueueing in the wizard.
2018-08-30 15:36:08 -06:00
Jeff Stieler 934b6e1698 OBW: remove live rates from shipping step. 2018-08-30 15:35:16 -06:00
Claudiu Lodromanean dc55b9b002
Merge pull request #21232 from hahn208/fix/21229-shipping-class
#21229 Updated class attribute for shipping class meta box
2018-08-30 12:17:49 -07:00
Claudio Sanches 4738162c25 Improvements to wc_create_attributes (DRI) 2018-08-30 12:13:16 -07:00
Hahn 6623db017b #21229 Updated class attribute for shipping class meta box 2018-08-30 12:17:43 -06:00
Claudiu Lodromanean fd722da88a
Merge pull request #21188 from woocommerce/fix/21156
Updated phone validation and formatting rules.
2018-08-30 09:52:13 -07:00
Jeff Stieler 8a29945531 OBW: move Jetpack+WCS requirement description to plugin install info area at bottom of payment step. 2018-08-29 16:47:46 -06:00
Jeff Stieler 0028902eb2 OBW: change Stripe and PayPal account creation to opt-out and remove descriptions. 2018-08-29 16:44:47 -06:00
Rodrigo Primo eee61b7880 Merge branch 'issue/21062' of https://github.com/kakshak/woocommerce into kakshak-issue/21062 2018-08-29 13:27:39 -03:00
Rodrigo Primo e3cbebf29e
Merge pull request #21192 from woocommerce/fix/20979
Restrict category creation in importer to appropriate permissions
2018-08-29 11:27:49 -03:00
Rodrigo Primo f1c2dbbf2b Remove unneeded phpcs ignore comment 2018-08-29 10:34:06 -03:00
Rodrigo Primo e28bdddbc2
Merge pull request #21191 from woocommerce/fix/21161
Only suppress comments number on unsupported theme shop page
2018-08-29 10:29:20 -03:00
Grzegorz Rola 9df10fac5a Taxes should be rounded on subtotals in cart when option woocommerce_tax_round_at_subtotal is checked. 2018-08-29 13:43:13 +02:00
Grzegorz Rola 20ac4a8b69 Taxes should be rounded on subtotals in cart when option woocommerce_tax_round_at_subtotal is checked. 2018-08-29 13:34:22 +02:00
Grzegorz Rola 5c3f4c9c10 Revert "Taxes should be rounded on subtotals in cart when option woocommerce_tax_round_at_subtotal is checked."
This reverts commit dafcbc5
2018-08-29 13:25:22 +02:00
Grzegorz Rola dafcbc56b0 Taxes should be rounded on subtotals in cart when option woocommerce_tax_round_at_subtotal is checked. 2018-08-29 13:22:51 +02:00
Claudiu Lodromanean 1258f242ff
Merge pull request #21204 from woocommerce/fix/21197
Corrected wording of stock quantity description.
2018-08-28 13:23:49 -07:00
Claudiu Lodromanean 8d21f4ad77
Merge pull request #21205 from woocommerce/fix/21107
Unslash city name to prevent double escape.
2018-08-28 13:04:23 -07:00
Claudiu Lodromanean e1b1aca807
Merge pull request #21200 from madeincosmos/fix/21199
Enable PDT handling for custom pending payment statuses
2018-08-28 10:47:53 -07:00
Peter Fabian 964ee9ac1a Unslash city name to prevent double escape. 2018-08-27 18:33:14 +02:00
Peter Fabian 32d3ff76c5 Use simple quote. 2018-08-27 17:28:29 +02:00
Peter Fabian 058f14e7d3 Corrected wording of stock quantity description. 2018-08-27 17:20:46 +02:00
Maria Górska 0369e3d622 Enable PDT handling for custom pending statuses 2018-08-27 12:10:36 +02:00
Gerhard Potgieter 43de3d00cd Remove icanhazip service from ip lookup, their DNS is blacklisted and blocked by most servers. 2018-08-27 11:21:37 +02:00
claudiulodro 87054ece9a Add hidden label on address line 2 input on checkout 2018-08-24 11:57:30 -07:00
claudiulodro 74645b13f9 Dont allow users without manage_product_terms permissions to create categories using the importer 2018-08-24 11:32:48 -07:00
claudiulodro 2e87ec3bf1 Only suppress comments number on unsupported theme shop page 2018-08-24 10:46:57 -07:00
Claudiu Lodromanean 66c7c244ca
Merge pull request #21186 from woocommerce/fix/string-i18n
Use entire sentence for checkout address_2 placeholder string
2018-08-24 10:04:54 -07:00
Claudiu Lodromanean d72ffe48e7
Merge pull request #21180 from woocommerce/fix/21160
Make RO state required.
2018-08-24 09:53:53 -07:00
Claudiu Lodromanean 1b405c2c12
Merge pull request #21162 from wackywombaat12/Fix/20987
Fix/20987
2018-08-24 09:51:23 -07:00
Claudiu Lodromanean a479ba1ff6
Merge pull request #21168 from woocommerce/fix/21079
Updated order of array traversal to respect user's order
2018-08-24 07:04:05 -07:00
Peter Fabian 897af8d20e Updated phone validation and formatting rules. 2018-08-24 15:43:46 +02:00
Rodrigo Primo e1aa7bba4d Use entire sentence for checkout address_2 placeholder string
The placeholder string that is displayed in the address_2 field in the checkout was changed in #20639 to hide the "(optional)" part when the field is mandatory. The problem is that this was done splitting the sentence in two parts which goes against i18n best practices (https://developer.wordpress.org/themes/functionality/internationalization/#best-practices-for-writing-strings) as the order of the words can be different depending on the language. This commit creates two full sentences one with the "(optional)" part and another one without it to better support the translation of both strings.
2018-08-24 09:45:16 -03:00
Peter Fabian 2e350fe5b7 Small PHPCS fix. 2018-08-24 09:21:49 +02:00
Gerhard Potgieter bea8151533 Make RO state required. 2018-08-24 09:16:07 +02:00
Jack Boyle 63b84ef407 Fix Requested Changes
Changed to check if field exists and the field is not blank.
2018-08-24 13:03:09 +10:00
Claudiu Lodromanean babfacd6bb
Merge pull request #21108 from woocommerce/fix/21025
Set tabindex=1 for notices
2018-08-23 13:11:08 -07:00
Andrew Minion 067a79c336
fix typo 2018-08-23 14:37:54 -04:00
Peter Fabian f5fd36fbdf Updated order of array traversal to respect user's order when changing order of attributes for variations. 2018-08-23 18:41:28 +02:00
Gerhard Potgieter 2ce1262f69 Humanize admin cancelled order emails 2018-08-23 09:38:16 +02:00
Gerhard Potgieter 903523638a Admin new order default subject change 2018-08-23 09:06:28 +02:00
Gerhard Potgieter 679399b4b2 Humanize admin new order email 2018-08-23 09:04:24 +02:00
Jack Boyle fd33f2c2a6 Added Tests
Added Tests for new wildcard functionality.
2018-08-23 15:23:35 +10:00
Jack Boyle c4eda39177 Add wildcard handler for SKU and other meta values
Add wildcard handler for SKU and other meta values
2018-08-23 09:59:39 +10:00
Claudiu Lodromanean fe69a875e2
Merge pull request #20993 from woocommerce/fix/20959
Changed wc_clean to checking for valid utf8 for line items and password.
2018-08-22 10:12:48 -07:00
Gerhard Potgieter 64c9b5fc6a
Merge pull request #21109 from woocommerce/fix/21057
Fix: properly output product structured data when product URL contains some non-ASCII characters
2018-08-22 13:09:14 +02:00
James Kemp 1ca1189f79
Add params to `woocommerce_variation_option_name` for admin variations 2018-08-22 11:49:17 +01:00
James Kemp 9fe201dd86
Add parameters to `woocommerce_variation_option_name` in admin view 2018-08-22 11:44:40 +01:00
James Kemp 111c2fded0
Add more parameters to `woocommerce_variation_option_name`
Add term, taxonomy, and product object to the `woocommerce_variation_option_name` filter.
2018-08-22 11:37:47 +01:00
kakshak 4d17ebeadc fix(woocommerce): per cart coupon condition updated 2018-08-22 11:09:58 +05:30
kakshak 0f27d4799b Merge branch 'master' of https://github.com/woocommerce/woocommerce into issue/21062 2018-08-22 11:03:55 +05:30
Claudiu Lodromanean bfa36fe923
Merge pull request #21106 from woocommerce/fix/21027
Use refund currency when displaying refund amount
2018-08-21 12:46:59 -07:00
Claudiu Lodromanean 9777ba18ff
Merge pull request #21103 from woocommerce/fix/21093
Disabled postcode requirement for Bahrain.
2018-08-21 12:11:11 -07:00
Peter Fabian 5b0cc306a5 Moved the wc_kses_notice to wc-notice-functions.php and applied it in wc_print_notices(). 2018-08-21 12:00:48 +02:00
Peter Fabian 9845c3c131 PHPCS. 2018-08-21 11:48:29 +02:00
Peter Fabian ae05d6e5ea Removed author tag and bumped version of templates to 3.5.0, factored out function to one common place. 2018-08-21 11:47:50 +02:00
Peter Fabian 9319b3c262 Bahrain postcode visible, but not required. 2018-08-21 11:15:09 +02:00
Rodrigo Primo e1ac6317da Include URL for the last element in breadcrumb list
I noticed that the structured data generated by WooCommerce doesn't pass Google Structured Data validation (https://search.google.com/structured-data/testing-tool) due to the following error in the last element of the BreadcrumbList:

"The value provided for item.id must be a valid URL."

This happens because the code was explicitly omitting the URL for the last element. This commit simply removes this check and now an URL is included for every element (unless there is no URL set).
2018-08-20 18:02:38 -03:00
Rodrigo Primo 5e7c8c6959 Remove unneeded call to wc_clean() when outputting product structured data
This commit removes an unneeded call to wc_clean() before outputting product structured data to the browser. wp_json_encode() is called before the data is sent to the browser and it should be enough to escape it. wc_clean(), which calls sanitize_text_field() internally, was causing issues with the product URL when its name contained some non-ASCII characters (see #21057 for examples of characters).
2018-08-20 14:48:17 -03:00
Claudiu Lodromanean 42e2e4a4b2
Merge pull request #21073 from woocommerce/fix/20694
Show system status updates for woocommerce wp.org plugins
2018-08-20 10:29:01 -07:00
Peter Fabian 355d95db9d Added tabindex 1 to Add to cart notices (View cart/Continue shopping). 2018-08-20 18:39:31 +02:00
Rodrigo Primo b8354da6b1 Use refund currency when displaying refund amount
Use the refund currency when wc_price() is called to display the refund amount in the "Edit order" admin screen. Without this change, wc_price would use the store default currency which is a problem for stores that at some point changed their currency or stores using extensions which support multiple currencies.
2018-08-20 11:32:56 -03:00
Rodrigo Primo aef5d3373c phpcs fixes 2018-08-20 11:12:12 -03:00
Peter Fabian a777f9b548 Disable postcode requirement for Bahrain. 2018-08-20 12:40:53 +02:00
kakshak 6c57b59353 fix: ability to apply coupon on a sale item even when the coupon is restricted to only non sale items 2018-08-18 13:02:51 +05:30
Peter Fabian 1a2f0d4a0b Removed check for invalid utf8 in passwords. 2018-08-17 11:01:30 +02:00
Claudiu Lodromanean 6eea244a28
Merge pull request #21074 from woocommerce/fix/21026
Fixes two product attributes issues when non-ASCII characters are used in the attribute name
2018-08-16 13:22:16 -07:00
Claudiu Lodromanean f1c6f3cb3e
Merge pull request #21065 from andgrankin/patch-1
Fixed typo in translations context
2018-08-16 12:59:57 -07:00
Claudiu Lodromanean 7a0b15b9ec
Merge pull request #21072 from woocommerce/fix/21071
Hide activate step in wizard when you cannot install plugins
2018-08-16 12:55:41 -07:00
Gerhard Potgieter 2c15bee1d4 Refine wp.org update check to use correct data structures when querying data. 2018-08-16 14:27:35 +02:00
Gerhard Potgieter 2625823734 Add fallback to wp.org plugin info check if the changelog check fails, this is for free plugins hosted on .org 2018-08-16 14:09:39 +02:00
Gerhard Potgieter 1b98c1e22e Hide activate step on wizard when the user does not have install_plugins capability, administrators on multisites cannot install plugins, only super admins are allowed. 2018-08-16 12:38:27 +02:00
David Marín bc86676b7e
Update class-wc-meta-box-product-data.php 2018-08-16 09:28:48 +02:00
David Marín 6b3ef46f4e
Complete filter call 2018-08-16 09:28:03 +02:00
David Marín 97eddce025
Admin: New filter to customize variations count
Adding new filter to customize variations count, so internal-use variations can be hidden by plugins.
2018-08-16 08:37:25 +02:00
andgrankin 5bb55159a7
Fixed typo in translations context
When only one shipping package translation was not applied because of wrong context.
2018-08-16 12:30:42 +07:00
Rodrigo Primo 4d2530ef45 Fix: product attributes cache should work when non-ASCII characters are used
This commit fixes an issue in the code that sets product attributes that was breaking product attributes cache removal when non-ASCII characters are used in the attribute name. For more information see https://github.com/woocommerce/woocommerce/issues/21026#issuecomment-412111740
2018-08-15 13:24:33 -03:00
Rodrigo Primo fef0cd48ea phpcs fixes 2018-08-15 13:24:09 -03:00
Claudiu Lodromanean ec0613ad78
Merge pull request #21056 from Luminus/fix-21055
Make postcode field optional and hidden for Nigeria and label State correctly
2018-08-15 08:38:13 -07:00
Luminus Olumide Alabi 798cd36f04 Make postcode field optional and hidden for Nigeria and label State correctly 2018-08-15 10:36:20 +01:00
Nico Mollet cc9e904cfc
Standardize case of button View cart
Hello,

In this WC_Cart class, there are two string for `View cart`.
Line 1037 and line 1065.

The other `button wc-forward` buttons are first character uppercase only.

The PR changes `View Cart` to `View cart`.
Thank you
2018-08-15 09:13:59 +02:00
Claudiu Lodromanean 41a9994e52
Merge pull request #21051 from woocommerce/feature/add-cart-contents-filter
Add new filter to allow modifications of cart contents
2018-08-14 13:02:25 -07:00
Boro Sitnikovski a1bec3f200 Update comment style 2018-08-14 21:30:02 +02:00
Boro Sitnikovski 1c4ef011d2 Add new filter to allow modifications of cart contents 2018-08-14 18:34:52 +02:00
Rodrigo Primo 20fd569a55 Fix clearing filters in "Filter products by attribute" widget
This commit fixes an issue that was making it impossible to clear filters in the "Filter products by attribute" widget when the attribute name contained non-ASCII characters. The problem was caused by a call to sanitize_title() which doesn't seem necessary as it is sanitizing one of the widget parameters which is already sanitized in 679d719368/includes/widgets/class-wc-widget-layered-nav.php (L116). So this commit simply removes the sanitize_title() call. Even if we needed to sanitize the variable `$taxonomy`, it would be better to use sanitize_text_input_field() or wc_sanitize_taxonomy_name() as sanitize_title() will replace accented characters.

For more about the problem that is fixed by this commit see #21028
2018-08-14 11:45:57 -03:00
Rodrigo Primo a637fe10b8
Merge pull request #21018 from Luminus/fix-21016
Make city field optional and hidden for Singapore addresses
2018-08-14 10:31:27 -03:00
Peter Fabian 4dce6ec050
Merge pull request #21011 from woocommerce/fix/21010
Allow usage of orderby sorting via GET params when using the shortcode.
2018-08-14 09:54:11 +02:00
Claudiu Lodromanean 28f4185899
Merge pull request #21038 from woocommerce/fix/21002
Update customer's ip address on successful payment.
2018-08-13 11:32:09 -07:00
Peter Fabian ca08beaa42 Changed explicit check to implicit. 2018-08-13 19:44:33 +02:00
Peter Fabian 96b9ebae14
Merge pull request #21007 from woocommerce/fix/21000
jquery-blockui dependency for wc-add-to-cart and wc-add-to-cart-variation scripts.
2018-08-13 19:36:00 +02:00
Peter Fabian 84e008337c Update customer's ip address on successful payment. 2018-08-13 14:37:21 +02:00
Peter Fabian 1c2f51ee86 Unslashed the SKU for variation. 2018-08-09 12:13:23 +02:00
Peter Fabian d4fab78b05 PHPCS update. 2018-08-09 11:30:40 +02:00
Luminus Olumide Alabi a3d8c6d599 Make city field optional and hidden for Singapore addresses 2018-08-09 10:02:09 +01:00
Claudiu Lodromanean 11911aa2ea
Merge pull request #20870 from woocommerce/add/export-products-based-on-category
Add category filter to product export functionality.
2018-08-08 08:51:58 -07:00
Gerhard Potgieter 1f4e86bd83 Allow exporting of variations for a parent product when a category is selected since variations are not tied to a category. 2018-08-08 14:45:57 +02:00
Gerhard Potgieter a250b0044f Add support for order as well to the shortcode 2018-08-08 13:44:47 +02:00
Gerhard Potgieter 2596796de3 Allow usage of orderby sorting via GET params when using the shortcode. 2018-08-08 11:05:27 +02:00
Gerhard Potgieter 7db8940d2d
Merge pull request #20982 from shabnam611/fix/20943
Fix for issue 20943: Removed unnecessary php tag [point 2] and removed a return false stat…
2018-08-08 10:51:31 +02:00
Shabnam 722c21066f changed version to 3.5.0 and adjusted the curly brace 2018-08-08 13:27:54 +06:00
Gerhard Potgieter 90cc41c895 Make jquery-blockui dependencies for wc-add-to-cart and wc-add-to-cart-variation since it uses the block function but has not dependency on the woocommerce script. 2018-08-08 08:56:49 +02:00
Gerhard Potgieter b9a28b7ec2 Allow for multiple category selections when exporting. 2018-08-07 16:58:39 +02:00
Gerhard Potgieter 70e9b747e8
Merge pull request #20832 from rnaby/180718-010448-class-wc-checkout
HashTable Implemented
2018-08-07 12:26:08 +02:00
Rodrigo Primo 7922e68022
Merge pull request #20953 from woocommerce/fix/20927
Hide "Stock status" field for grouped products
2018-08-07 06:58:36 -03:00
Peter Fabian 925002bc37 Changed wc_clean sanitization to checking for valid utf8 and the input is later sanitized by WordPress db layer.
It caused issues in 2 places: Order item name (product name) and user's password.
2018-08-06 20:49:27 +02:00
Claudiu Lodromanean d32a675c25
Merge pull request #20931 from woocommerce/fix/download-log-data-store
Fix: orderby and order parameters in WC_Customer_Download_Log_Data_Store::get_download_logs()
2018-08-04 07:57:17 -07:00
Shabnam 4affbff47e removed unnecessary php tag [point 2] and removed a return false statement[point 3] 2018-08-04 19:51:25 +06:00
Claudio Sanches 0b0fba824b Returns only reviews and fixed prepared args 2018-08-02 14:01:46 -03:00
Gerhard Potgieter 19401ea7d0 Fix PHPCS errors on WC_Action_Queue and make sure to pass on correct variable in schedule_cront function. 2018-08-01 20:11:08 +02:00
Gerhard Potgieter 883a5f90eb Fix PHPCS errors in WC_Queue class 2018-08-01 20:07:14 +02:00
Claudiu Lodromanean 71f67b0f2b
Merge pull request #20030 from thenbrent/issue_18003
Prototype using Action Scheduler Event Queue for Async Webhook Delivery
2018-08-01 09:57:56 -07:00
Rodrigo Primo 1274c61a7c Hide "Stock status" field for grouped products
In the product admin page, the field "Stock status" should be hidden for grouped products as stock is controlled individually for each of the child products and setting a stock status in the parent product has no effect.

Fixes #20927
2018-08-01 10:30:21 -03:00
Rodrigo Primo 4f41f99cd2 phpcs fixes 2018-08-01 10:27:22 -03:00
Rodrigo Primo deb48c7c7a Merge branch 'master' of github.com:woocommerce/woocommerce 2018-07-31 16:12:22 -03:00
Rodrigo Primo 3f82ecee8c Remove unnecessary uses of @codingStandardsIgnoreLine 2018-07-31 16:10:51 -03:00
Claudiu Lodromanean 3a6f14f380
Merge pull request #20905 from woocommerce/fix/20904
Fixes an issue with the 'woocommerce_grant_product_download_access' hook
2018-07-31 11:31:05 -07:00
Claudio Sanches c98cb8b0fd Introduced batch endpoint and set default for status 2018-07-31 13:33:33 -03:00
Claudio Sanches 48078f6bcc DELETE /product/reviews/<id> 2018-07-31 12:37:44 -03:00
Claudio Sanches a286bde484 PUT /products/reviews/<id> 2018-07-31 11:51:18 -03:00
Brent Shepherd ab78e65af9 Update WC_Queue_Interface::get_next()
To more closely align return value with other date APIs in WC, namely
WC_Data. Includes changing return value to:

1. a WC_DateTime instead of a timestamp when a scheduled occurrence is found
2. null instead of false, similar to the default of WC_Data::set_date_prop()
2018-07-31 12:29:15 +10:00
Brent Shepherd d9158a8c0e Add WC_Queue and WC()->queue() wrapper for accessing it
To take care of instantiating a canonical job queue for use across
all of WooCommerce, and by 3rd party code.

Also use this new API for enqueuing webhooks instead of raw Action
Scheduler APIs.
2018-07-31 12:21:07 +10:00
Brent Shepherd 0611ff7665 Add WC_Action_Queue
As a wrapper for Action Scheduler. This implements the WC_Queue_Interface
so it can be used as WC core's job queue. Implementing WC_Queue_Interface
also means this class has more generic and appropriate job queue nomenclature
than Action Scheduler itself. For exsample, it provides a method for
non-delayed jobs, i.e. WC_Queue_Interface::add(), unlike Action Scheduler,
which requires scheduling a job for now(), which while fairly simple, is not
intuitive or immediately obvious to new comers.

This makes it both more clear and convenient to use Action Scheduler
as a simple job queue instead of just a queue for delayed jobs.
2018-07-31 12:21:04 +10:00