Claudio Sanches
4f1577fb27
Added support new WC_DateTime in WC_Customer
2017-03-10 01:20:33 -03:00
JeroenSormani
d97ae5f9a6
Set the default to '' to prevent warning
2017-03-01 19:45:38 +01:00
Mike Jolley
1d9f71fee5
Wrap read with try catch block
2017-02-23 12:09:39 +00:00
Justin Shreve
dcecf0f228
Fix get_hook_prefix format
2017-01-24 11:02:06 -08:00
Justin Shreve
58b4cb9cf4
Make sure get_hook_prefix is present on all of our classes.
...
And fix up an exclude internal keys call for the customer data store.
2016-11-22 04:20:25 -08:00
Justin Shreve
174aa38be6
Start moving meta to normal stores, instead of a separate meta store.
2016-11-22 04:05:05 -08:00
Mike Jolley
8d6f236d47
Fix save
2016-11-17 16:02:09 +00:00
Mike Jolley
d88b512143
Setters
2016-11-17 15:17:23 +00:00
Mike Jolley
286cb2d1c8
get_address_prop for customers
2016-11-17 15:05:40 +00:00
Justin Shreve
53524141b7
Fix up the other delete signatures.
2016-11-15 11:35:10 -08:00
Mike Jolley
00ed627b29
Data stores
2016-11-14 18:18:08 +00:00
Justin Shreve
1797c76a14
Implement WC_Data_Store and related code & tests.
2016-11-08 01:39:47 -08:00
Mike Jolley
32e814eef1
Use all paid statuses in $customer->get_total_spent()
2016-11-03 11:27:03 +00:00
Justin Shreve
bff6f5f2ad
Remove the $id parameter from Customer & Coupon CRUD's update_post_meta fucntion.
...
This is a private function that will only interact with one specific object ($this->get_id()).
2016-10-19 08:15:49 -07:00
Mike Jolley
cfbb8d6601
Use meta as a cache for order/spent methods.
...
Closes #12080
2016-10-14 15:11:10 +01:00
Aristeides Stathopoulos
831b4463d0
Merge pull request #5 from woothemes/master
...
sync
2016-09-09 16:49:48 +03:00
Justin Shreve
e1e6c682b5
* Stop using _ as a prefix for protected or private vars and functions. We have a keyword for that.
...
* Introduces set_id and get_id to WC_Data for the CRUD classes to share
2016-09-09 05:36:54 -07:00
Aristeides Stathopoulos
734f284fa4
WordPress.PHP.YodaConditions.NotYoda
2016-09-08 01:32:24 +03:00
Aristeides Stathopoulos
8fe4cd65a4
PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket
2016-09-02 04:12:22 +03:00
Aristeides Stathopoulos
fde1037757
fix failing tests.
2016-09-01 23:50:14 +03:00
Mike Jolley
1b2df3dd3b
Merge branch 'pr/11797'
...
# Conflicts:
# includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
# includes/api/class-wc-rest-coupons-controller.php
# includes/class-wc-coupon.php
# tests/unit-tests/api/coupons.php
# tests/unit-tests/coupon/crud.php
2016-09-01 11:46:05 +01:00
Mike Jolley
d9a0d0988b
Handle meta data and fix unit tests
2016-08-31 15:43:34 +01:00
Mike Jolley
1595cc5767
remove changed
2016-08-31 13:25:13 +01:00
Mike Jolley
7439f6d79f
Use set_props
2016-08-30 17:59:41 +01:00
Mike Jolley
047242515d
Make API and CRUD use consistent keys and make use of data
2016-08-30 17:50:35 +01:00
Mike Jolley
1d7c8d8370
Handle read with set_props
2016-08-30 14:48:29 +01:00
Mike Jolley
ee356d2f29
Add WC_Data_Exception
2016-08-30 14:34:58 +01:00
Aristeides Stathopoulos
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
17961f6484
WordPress.Arrays.ArrayDeclaration.ValueNoNewline
2016-08-27 06:04:10 +03:00
Claudio Sanches
a6ffd4cafd
Update customer fields
2016-08-20 14:29:27 -03:00
Claudio Sanches
80ee7016f8
Fixed conflicts
2016-08-19 20:31:59 -03:00
Mike Jolley
e99798f16e
Date modified is read only and set by WP after update
2016-08-16 11:57:25 +01:00
Mike Jolley
46b6ca0f3b
Only read users from current site
2016-08-16 11:08:54 +01:00
Mike Jolley
de7e522835
Remove customer order queries for performance reasons and offer get_last_order() method instead.
...
Same for order counts - these don’t need to be populated after read,
only when needed. cc @justinshreve
2016-08-16 10:04:52 +01:00
Mike Jolley
589ce2f544
Write context
2016-08-15 18:26:00 +01:00
Mike Jolley
83dca89d0c
Correct customer escaping and tests
2016-08-15 16:53:48 +01:00
Mike Jolley
14b40ea340
Handle first and last name fields
...
@justinshreve
2016-08-15 14:13:20 +01:00
Mike Jolley
e1318d9175
Stop WP core meta data being removed for customers
...
@justinshreve
2016-08-15 13:17:43 +01:00
Justin Shreve
a610c6a804
Update the Customers API to use the WC_Customer CRUD Class
...
Also:
* Introduces Tests for the Customer REST API
* Fixes a few API and test issues from recent CRUD changes
* Adds some missing billing_ and shipping_ meta data functions to Customer CRUD
2016-08-11 10:30:44 -07:00
Mike Jolley
f4b45001ec
Merge conditonal
2016-08-09 11:17:47 +01:00
Mike Jolley
b7dcd97572
Sanitize on set only
2016-08-09 11:16:54 +01:00
Mike Jolley
01a4c81094
Spacing
2016-08-09 11:16:13 +01:00
Justin Shreve
e3b1f6dbc9
A few fixes to customer CRUD:
...
* Implement some missing legacy functions
* Stop calling legacy functions from some pages
* Prevent extra meta from being deleted, unless requested by the CRUD (was causing problems with user/customer)
* Prevent save when loading from session AND logged out
2016-08-04 13:13:07 -07:00
Justin Shreve
f4353f6aa9
Don't save to the database if we are working with sessions, save to the session when save() is called instead.
2016-08-04 11:39:34 -07:00
Mike Jolley
1bc9da3e91
Merge branch 'master' into WC-CRUD
...
# Conflicts:
# includes/class-wc-coupon.php
2016-08-04 12:10:04 +01:00
Mike Jolley
92c670acde
Fix - woocommerce_local_pickup_methods comparison by stripping instance IDs before the check.
...
@claudiosmweb Seems that local_pickup in zones did not get base tax
applied due to method id mismatch.
2016-06-29 15:23:42 +01:00
Mike Jolley
78142a8ebb
Merge branch 'master' into WC-CRUD
...
# Conflicts:
# includes/class-wc-checkout.php
# includes/class-wc-coupon.php
# includes/class-wc-customer.php
# tests/unit-tests/cart/cart.php
# tests/unit-tests/cart/functions.php
# tests/unit-tests/coupon/coupon.php
# woocommerce.php
2016-06-13 15:01:58 +01:00
Mike Jolley
1cb15b2636
Fix unit tests
2016-05-25 12:46:16 +01:00
Fredrik Forsmo
398ab8a016
Add `public` keyword to public various methods
2016-04-26 19:26:56 +02:00
Justin Shreve
d98299778e
Fix set_to_base deprecated call
2016-03-17 13:28:40 -07:00