Mike Jolley
5e2f1de36b
get id once
2017-02-01 01:44:16 +01:00
Mike Jolley
2d013eb5be
Handle wp prefix in php
2017-02-01 01:43:52 +01:00
Mike Jolley
5b221b4ed0
Edit context
...
#12936
2017-01-31 17:26:49 +01:00
Mike Jolley
dee73d4056
Use edit context on load
...
Closes #12936
2017-01-31 09:39:19 +01:00
Mike Jolley
abe87d9bfa
Merge pull request #12967 from woocommerce/fix/variation-get-name
...
Clean up variation names.
2017-01-27 17:01:34 +00:00
Brent Shepherd
e7e434da4b
WC_Product_Variable::sort_variation_prices()
...
To keep variation sorting logic inside the variable product, and separate
from the database storage logic in WC_Product_Variable_Data_Store_CPT
2017-01-26 12:47:46 -08:00
Justin Shreve
7b1adfb98f
Bake out of get_title deprecation changes
2017-01-26 07:46:59 -08:00
Justin Shreve
32651f638c
When updating payment tokens, only update the props that have changed + fire off a hook of the changed props.
2017-01-25 11:05:54 -08:00
Justin Shreve
318046789c
Comment clarifying translation wrapper.
2017-01-25 10:40:14 -08:00
Justin Shreve
9889efec75
Catch Product # titles and remove error logs
2017-01-25 10:37:48 -08:00
Justin Shreve
f344143b63
Catch variation text and update
2017-01-25 10:27:28 -08:00
Mike Jolley
5746c87580
Merge pull request #12968 from woocommerce/updated-props-action
...
Fire actions for updated props
2017-01-25 00:10:48 +00:00
Mike Jolley
3afb00da06
Fixed Typo
2017-01-25 00:09:57 +00:00
Mike Jolley
ea817a5c88
Merge pull request #12970 from thenbrent/check_variation_post_type
...
Check post type during read of product variations
2017-01-25 00:08:54 +00:00
Mike Jolley
90fd0da7d0
Fire actions for updated props
2017-01-24 21:38:02 +00:00
Brent Shepherd
49095f0a6c
Check post type during read of product variations
...
Continuation of #12795
2017-01-24 12:28:02 -08:00
Brent Shepherd
f2cb083bd6
Read extra data for variation products
...
So that classes can extend WC_Product_Variation and use the existing
WC_Product_Variation_Data_Store_CPT class, rather than having to create
a new data store class to set the WC_Product_Variation::$extra_data
values.
2017-01-24 12:20:15 -08:00
Brent Shepherd
56c427acba
Add WC_Product_Data_Store_CPT::read_extra_data()
...
So that a product's $extra_data can also be read by child classes of
WC_Product_Data_Store_CPT, like WC_Product_Variation_Data_Store_CPT,
without duplicating the code to read it.
2017-01-24 12:18:35 -08:00
Justin Shreve
2b464d2e52
Deprecate get_title and it's hook, use get_name instead and pull name from parent.
2017-01-24 12:10:36 -08:00
Justin Shreve
2cdf950963
Merge pull request #12950 from woocommerce/fix/meta-update
...
Data Stores & update_post_meta: Update changed & keys that don't exist.
2017-01-24 07:14:54 -08:00
Justin Shreve
711a381ff6
Remove error log
2017-01-23 13:16:49 -08:00
Justin Shreve
3d55efffac
Move order logic to wc-order
2017-01-23 13:08:55 -08:00
Justin Shreve
1ab0b34926
Fix meta handling logic for update_post_meta: Only update keys that have changed or don't exist.
2017-01-23 12:20:29 -08:00
Brent Shepherd
1ac2c1a94f
Move price hash to separate function
...
So that it can be used by child classes without copy/pasting code.
2017-01-23 11:57:49 -08:00
Mike Jolley
1e9659b235
Merge pull request #12884 from kreamweb/master
...
Fix: usermeta table name, in a multisite the usermeta table is common…
2017-01-23 11:54:59 +00:00
Brent Shepherd
ff627b31f6
Make variable data store private methods protected
...
So they can be inherited by other variable product types, like
variable subscriptions.
2017-01-20 11:09:49 -08:00
Mike Jolley
fa9fed4e4d
Merge pull request #12908 from thenbrent/fix_refund_data_store_read
...
[2.7] Fix WC_Order_Refund_Data_Store_CPT::read() and Abstract_WC_Order_Data_Store_CPT's support for other custom order types
2017-01-20 10:44:18 +00:00
Mike Jolley
f44b4f6e9f
Merge pull request #12907 from thenbrent/get_order_count_param
...
[2.7] Fix name of get_order_count() param
2017-01-20 10:43:06 +00:00
Brent Shepherd
c8f003d5b0
Fix WC_Order_Refund_Data_Store_CPT::read()
...
Abstract_WC_Order_Data_Store_CPT::read() hardcoded its validation against
the 'shop_order' post type. However, custom order types created via the
wc_register_order_type() API can use different post types. For example,
refunds have the post type: 'shop_order_refund'.
This patch changes the Abstract_WC_Order_Data_Store_CPT::read() validation
to check that the post type is any of the registered order types.
This fixes refunds and 3rd party custom order types, like subscriptions.
2017-01-19 16:18:42 -08:00
Brent Shepherd
f9569df1ee
Fix naming of get_order_count() param
...
The parameter is actually an order status, not type.
2017-01-19 15:40:20 -08:00
Justin Shreve
98343ffe26
Fix docblocks and cast the order ID as int after our query.
2017-01-19 09:38:23 -08:00
Justin Shreve
a1446c9591
Add method for getting order id from order item id.
2017-01-19 09:30:19 -08:00
emanuela castorina
c4c78442cf
Fix: usermeta table name, in a multisite the usermeta table is common to all sites
2017-01-18 18:11:21 +01:00
Justin Shreve
b660eda4b8
Add date searching to wc_get_orders.
2017-01-17 12:52:27 -08:00
Claudio Sanches
fbfb195f2f
Fixed interfaces file names and location
2017-01-16 19:33:21 -02:00
Manos Psychogyiopoulos
892d5da7e9
get prices in 'edit' context when updating meta
2017-01-16 17:33:30 +02:00
Mike Jolley
ba8f308100
Merge branch 'master' into orphan-variations-fix-12614
...
# Conflicts:
# includes/class-wc-post-data.php
2017-01-11 15:42:20 +00:00
Mike Jolley
80f79ae98d
Trash and untrash variations handling
...
Fixes #12774
2017-01-11 15:41:19 +00:00
Mike Jolley
de11be2b6c
space
2017-01-11 12:37:03 +00:00
Mike Jolley
9706104128
Fix test case
2017-01-11 12:33:38 +00:00
Mike Jolley
8e7687b9fc
Add method to delete variations
2017-01-11 11:48:39 +00:00
Mike Jolley
b749b654bc
Fire action on type change
2017-01-11 11:48:31 +00:00
Mike Jolley
4e12ca6332
Merge pull request #12775 from kahanit/patch-1
...
Actions on delete of zone and zone method
2017-01-11 11:06:42 +00:00
Justin Shreve
cddcb7841e
Check post type during read of coupons, posts, and products.
2017-01-10 14:43:33 -08:00
Manos Psychogyiopoulos
022fbe4183
add 'include' arg to wc_get_products
2017-01-09 14:10:47 +02:00
Amit Sidhpura
887aa5fe1b
sorry change zone in action to shipping_zone
2017-01-07 11:16:31 +05:30
Amit Sidhpura
8de220beeb
Actions on delete of zone and zone method
...
Hooks on delete of zone and zone method.
I have named it 'woocommerce_delete_zone' and 'woocommerce_delete_zone_mehod' making it same format as customer delete action
'woocommerce_delete_customer'.
2017-01-07 11:10:36 +05:30
Mike Jolley
5dba3d5bfe
Sync variation names
2017-01-04 15:18:02 +00:00
Mike Jolley
5272f836a4
Merge branch 'read-price-data-caching'
2017-01-04 13:56:14 +00:00
Mike Jolley
a46ddc5dd2
Merge branch 'pr/12710'
2017-01-03 11:24:41 +00:00
Mike Jolley
e149509f55
Products can have parents too
2017-01-03 11:24:36 +00:00
Manos Psychogyiopoulos
d250d3f149
distinguish between trash and delete object hooks
2016-12-30 00:22:12 +02:00
Manos Psychogyiopoulos
96d7272065
include parent if entering variation id and variations excluded
2016-12-28 16:44:57 +02:00
Manos Psychogyiopoulos
5fa4846f5e
fix inclusion of variation included in product search
2016-12-28 16:41:21 +02:00
Manos Psychogyiopoulos
ae9f4eacc4
fix get_post_parent fatal error
2016-12-27 10:34:32 +02:00
Mike Jolley
ceee6c37ca
Change how non-crud props get stored
2016-12-23 14:06:51 +00:00
Mike Jolley
50b1a9d378
woocommerce_update_order
2016-12-20 15:44:37 +00:00
Mike Jolley
54ca822e57
Fix variable names
2016-12-19 17:13:25 +00:00
Mike Jolley
c78e5cf2ec
Trigger actions after data is saved
...
#12648
2016-12-19 16:40:53 +00:00
Mike Jolley
910d6d9900
Store custom checkout fields prefixed with shipping or billing in meta
...
Closes #12634
2016-12-19 14:51:56 +00:00
Mike Jolley
218689d9c3
woocommerce_order_data_store_cpt_get_orders_query
...
Closes #12643
2016-12-19 14:24:20 +00:00
Manos Psychogyiopoulos
03fac5231f
set order item object as read after reading child class data
2016-12-18 20:04:14 +02:00
Mike Jolley
95794b720c
Only set date_created if empty
...
Fixes #12579
2016-12-13 14:22:59 +00:00
Mike Jolley
6cf565c122
IDs for products were stored as strings in legacy
2016-12-12 15:29:53 +00:00
Mike Jolley
1e80db6021
Force meta to be written on creation
...
#12567
2016-12-12 13:56:35 +00:00
Mike Jolley
2c6bef3ce1
Reverse query so missing stock status meta does not break sync
...
Fixes #12567
2016-12-12 13:37:51 +00:00
Mike Jolley
0ce99fbdbb
Merge pull request #12558 from woocommerce/crud-reduce-queries
...
CRUD reduce queries
2016-12-10 12:35:45 +00:00
Mike Jolley
e0e0c9e832
Replace rating filters with taxonomy
2016-12-09 15:43:25 +00:00
Mike Jolley
5562cfc1f6
Lazy load product meta data
2016-12-09 12:18:21 +00:00
Mike Jolley
563dda505a
Use real cache keys
2016-12-08 17:57:07 +00:00
Mike Jolley
709d314ca7
Add caching to product factory
2016-12-08 17:17:23 +00:00
Mike Jolley
767a1e500e
Helper to get term ids
2016-12-08 17:01:39 +00:00
Mike Jolley
12608af03a
Sorting handling
2016-12-08 14:28:51 +00:00
Mike Jolley
56e9244b8b
Update vis during create
2016-12-08 12:38:30 +00:00
Mike Jolley
4bacbaf90c
Fix completed and paid date meta keys.
2016-12-08 11:19:32 +00:00
Mike Jolley
47fbae4d26
Product Visibility Taxonomies ( #12527 )
...
* Convert visibility and featured to taxonomy
* Comment
* Add missing tax_queries
* Only check SKU after read.
* Added visibility term for outofstock products to speed those queries up al
* wc_bool_to_string
2016-12-08 10:56:45 +00:00
Justin Shreve
f9891b1744
Pass product slug to wp_set_object_terms directly
2016-12-07 12:55:34 -08:00
Justin Shreve
63a29dd4db
Add 'locale' to list of customer meta keys, and update expected type for 'object' for gateways, products, and shipping zones to fix some API issues.
2016-12-07 12:23:23 -08:00
Mike Jolley
4bd05c7396
Combine 2 address loops
2016-12-05 16:08:51 +00:00
Mike Jolley
6a50228cda
Merge pull request #12472 from woocommerce/refactor-checkout-class
...
Checkout Refactoring
2016-12-02 16:16:18 +00:00
Justin Shreve
ede9d181b6
Merge pull request #12480 from franticpsyx/variable-data-store-read_price_data-methods-missing-method-context
...
[2.7] Wrong use of 'view' context in WC_Product_Variable_Data_Store_CPT:: read_price_data
2016-11-28 10:50:22 -08:00
Manos Psychogyiopoulos
08b81f73c6
add $product argument to `woocommerce_[variation_]set_stock_status` action
2016-11-28 19:03:33 +02:00
Manos Psychogyiopoulos
72c0877d82
switch variation price getters in WC_Product_Variable_Data_Store_CPT::read_price_data to 'edit' context
2016-11-28 13:54:35 +02:00
Mike Jolley
56396d305e
Fix last name
2016-11-25 21:46:52 +00:00
Mike Jolley
348efad1ed
Fix customer notes
2016-11-25 21:46:45 +00:00
Mike Jolley
43d362d107
Tidy, refactor, and split up methods in checkout class
2016-11-25 21:46:34 +00:00
Mike Jolley
30539b6f5a
Update display name when saving customer
2016-11-25 20:16:19 +00:00
Mike Jolley
1a632cda1f
Missing space and incorrect comment
2016-11-25 10:43:56 +00:00
Mike Jolley
1749551021
Customer crud
2016-11-24 15:31:05 +00:00
Mike Jolley
9087a45f29
Remove attribute_ prefix rather than add so that get_attributes has better return values, and don't show duplicate data in cart.
2016-11-24 14:20:48 +00:00
Mike Jolley
b9bb8eabba
Fix order item meta
2016-11-24 11:50:34 +00:00
Mike Jolley
13289b7104
Fix order item meta
...
@justinshreve Noticed this wasn’t saving or loading correctly. Is this
the only missing piece?
2016-11-23 18:44:24 +00:00
Mike Jolley
b1007c9d62
Fix order item meta saving
2016-11-23 15:37:34 +00:00
Mike Jolley
d846ca6311
Update parent meta too for refunds
2016-11-23 15:37:34 +00:00
Claudio Sanches
bdb863cef1
Fixed method return value in write context
2016-11-23 12:41:40 -02:00
Claudio Sanches
8d19832937
Fixed coding standards
2016-11-22 23:47:13 -02:00
Mike Jolley
885dad605a
Interface naming
2016-11-22 13:54:51 +00: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
0f335d7b60
Order item update store needs to extend the _WP class.
2016-11-22 04:07:46 -08:00
Justin Shreve
dd0a2317f1
Fix up data tests and some coding standards issues
2016-11-22 04:05:05 -08:00