Commit Graph

133 Commits

Author SHA1 Message Date
Mike Jolley 6367d19615 phpcs 2019-01-21 08:11:40 -08:00
Jeremy Pry 7cc3d098ea
Use proper return value for wc_customer_has_capability() docblock 2018-11-20 08:50:46 -05:00
Rodrigo Primo a2c18145fc Revert "Set post_author to 0 on all orders that belong to a deleted customer"
This reverts commit f725dc17af.
2018-10-29 11:16:07 -03:00
Rodrigo Primo f109008e0d Revert "Update wc_customer_bought_product() and customers report to use post_author instead of _customer_user"
This reverts commit b97f2749d6.
2018-10-29 11:15:22 -03:00
Rodrigo Primo 7c50892089 Revert "Pass user_id via $wpdb->prepare()"
This reverts commit 77add46705.
2018-10-29 11:07:20 -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
Jory Hogeveen 54036f8f38
Codestyle 2018-10-15 17:38:13 +02: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
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
Claudiu Lodromanean 0cd54b67c7
Merge pull request #20606 from woocommerce/refactor/order-again
Refactor "order again"
2018-06-26 12:10:55 -07:00
Mike Jolley 5ad0e12602 Store meta after login so we know when cart needs to merge 2018-06-22 12:39:21 +01:00
Rodrigo Primo 43d22a2349 Merge branch 'master' into update/use-post-author-for-customer-id 2018-06-18 15:17:19 -03:00
Claudio Marangon e3447635ae Conform returned error messages
The <strong>Error:</strong> should be removed because:

- the other errors in this function don't provide it either
- the process_registration() function in class-wc-form-handler.php also adds this string so it's added twice
2018-06-12 15:48:59 +02:00
Rodrigo Primo 77add46705 Pass user_id via $wpdb->prepare() 2018-06-11 11:04:19 -03:00
Rodrigo Primo dd8bf8b522 Merge branch 'master' into update/use-post-author-for-customer-id 2018-06-11 10:44:14 -03:00
TheDramatist 93e7419b17 Simplified wc_review_is_from_verified_owner (#20393)
* Simplified wc_review_is_from_verified_owner

* wc_review_is_from_verified_owner simplified
2018-06-06 12:16:43 +01:00
TheDramatist 090b7c89f4 wc_meta_update_last_update_time cleanning (#20382) 2018-06-05 13:31:05 +01:00
Khan M Rashedun-Naby 34360dff0a wc_create_new_customer logic simplified 2018-05-25 16:53:27 +06:00
Rodrigo Primo c49059ce7a Merge branch 'master' into update/use-post-author-for-customer-id 2018-05-08 17:34:09 -03:00
Rodrigo Primo b97f2749d6 Update wc_customer_bought_product() and customers report to use post_author instead of _customer_user 2018-05-07 17:25:58 -03:00
Rodrigo Primo f725dc17af Set post_author to 0 on all orders that belong to a deleted customer 2018-05-07 15:37:25 -03:00
Mike Jolley c765ce644d Inactive account handling 2018-04-30 15:38:45 +01:00
claudiulodro f9e45bea91 Bring up-to-date with master and resolve merge conflicts 2018-04-17 13:27:39 -07:00
Mike Jolley 93d20d9c93 Data removal handling 2018-04-13 18:03:02 +01:00
Mike Jolley 53a93fd3b1 Clean up user data on delete. 2018-04-13 15:07:38 +01:00
Claudio Sanches 9d42c323bf Fixed includes/wc-user-functions.php PHPCS violations 2018-03-08 18:26:56 -03:00
Steve Grunwell 493298504d Rewrite wc_get_customer_last_order() to leverage the customer data store.
The wc_get_customer_last_order() function (used by the v1 API) was performing a hard-coded SQL query against the postmeta table, regardless of the data store used by the WC_Customer class. This commit effectively makes the function act as a wrapper around WC_Customer::get_last_order().
2018-01-10 18:39:35 +00:00
Claudio Sanches da6c9c769a Include 'product_url' wc_get_customer_available_downloads() results
Also required to fix #17925
2017-11-29 19:49:54 -02:00
Gerhard Potgieter 95b669280a Refactor wc_update_new_customer_past_orders to not call update_post_meta directly but use the datastore. Check if order has downloadable items and then regenerate permissions. 2017-11-20 08:44:42 +02:00
Jeremy Madison 0b7f92ac84 Issue #17505: Apply filters to registration-error-email-exists error. (#17507)
* Issue #17505: Apply filters to registration-error-email-exists error message.

* Inlined apply_filters and fixed filter name
2017-11-07 20:16:56 +00:00
Mike Jolley 7606666de9 woocommerce_pre_customer_bought_product 2017-11-01 15:48:46 +00:00
Gabor Javorszky d530556a0f Add short circuit to customer bought product function 2017-10-30 17:20:55 +00:00
Mike Jolley fae130d038 Allow display_name to be searchable - this will commonly be full name
Closes #17104
2017-10-09 19:20:22 +01:00
Jaydeep Rami 3522857d23 Fix typo in WooCommerce plugin (#16135)
* Fixed typo

* Fixed more typo

* Fixed more typo

* Fix tyop

* Fix more typo

* Fix more typo

* Fix typo

* Fix typo

* Fix typo

* Fix typo datatime object

* Fix short name of compat

* Fix typo: update short name

* Fix typo "deactive" to "deactivate" and short BW - Compat

* Fix typo "Backwards compat"

* Fix typo 'parameters'

* Fix more typo 'pararmeters'

* Fix typo 'compund'

* FIx typo order

* Fix typo

* Fix typo 'incorrecly'

* Fix typo 'genarate'

* Fix typo 'reletive'

* Fix typo 'Handly'

* Fix typo 'rotatated'

* Fix typo

* Fix typo 'additonal'

* Fix typos
2017-07-17 11:10:52 +01:00
Mike Jolley 3939f50ced Download display in account/checkout 2017-07-11 13:45:35 +01:00
Job 9ca5556067 Login > Log in spelling
“Log in” is the verb, not “login”
2017-06-15 11:53:59 +02:00
Claudio Sanches df0ec12fb4 Deprecated wc_get_customer_avatar_url() in favor of get_avatar_url()
And remove duplicated code.
2017-06-09 16:25:57 -03:00
Mike Jolley 4367c9f6d4 Use user_can function
Use user can rather than roles directly.

If the user can edit posts, assume they are allowed an archive.

Fixes #15508
2017-06-09 15:18:35 +01:00
Rasmus Bengtsson 6a7fc8650f Remove unused local variables 2017-05-15 12:06:52 +02:00
Mike Jolley b258e64902 Add $order checks to ensure object is set 2017-04-12 13:46:14 +01:00
Claudio Sanches dbbe4617ee Do not force integer since will be saved as string by WordPress 2017-03-10 01:58:57 -03:00
Claudio Sanches 948963f5c7 Uses GMT/UTC+0 when update customer lastt_update 2017-03-10 01:57:53 -03:00
Claudio Sanches a10fa76438 Fixed empty file object in downloads data and removee extra download_name 2017-03-06 19:45:03 -03:00
pierrebuet f6c9dce9b4 fix user id for download file (#13220) 2017-02-17 11:55:11 +00:00