Claudio Sanches
24a5fe7592
Make WC_REST_Exception extend WC_Data_Exception
2017-01-27 13:52:21 -02:00
Claudio Sanches
8c84836423
Merge pull request #12998 from todeveni/patch-3
...
Cast position as integer
2017-01-27 13:20:52 -02:00
Claudio Sanches
80bc7128be
Merge pull request #13002 from thenbrent/fix_undefined_variable_function
...
Fix "Undefined variable: function" notice
2017-01-27 13:19:07 -02:00
Brent Shepherd
0e393da2cd
Fix woocommerce_order_add_product deprecation msg
2017-01-26 16:58:47 -08:00
Brent Shepherd
5e77311384
Fix deprecated action messages
...
Don't end sentence with double .. and instead of "Replace with Use CRUD"
just say "Replace with CRUD"
2017-01-26 16:44:28 -08:00
Brent Shepherd
7a77c70d2a
Fix "Undefined variable: function" notice
...
Triggered whenever wc_deprecated_argument() is called in an Ajax request.
Related to #12889
2017-01-26 16:31:11 -08:00
Brent Shepherd
50da0ebd4a
Fix default WC_Checkout::get_value() behaviour
...
Prior to SHA: 43d362d1
, WC_Checkout::get_value() would set the default value
for an $input whenever the value after was null after being passed through
filters. This logic changed with SHA: 43d362d1
to *always* return the filtered
value, even if the value was not changed by filters and was still null.
This means if any code filters just one checkout value, like order_comments,
then all other checkout values will default to null, because the has_filter()
check will pass, but the default null value won't be modified by that callback.
2017-01-26 14:47:43 -08:00
Toni Viemerö
2d92bdece6
Cast position as integer
...
Even though I'm sending `position` as integer in my REST request, it comes through as string value.
```
array (
'id' => '186',
'position' => '0',
)
```
2017-01-26 23:08:12 +02:00
Mike Jolley
e930ccd16e
object types to fix unit tests
2017-01-26 20:58:55 +00:00
Toni Viemerö
2b00615fa2
Remove tilde from i
2017-01-26 22:55:23 +02:00
Mike Jolley
82d7fe6e73
Added more missing args and types
2017-01-26 20:33:39 +00:00
Mike Jolley
b727c61da7
Missing arg and setting types
2017-01-26 20:06:18 +00:00
Mike Jolley
2d23705431
ID arg definitions
2017-01-26 19:22:57 +00:00
Mike Jolley
def35a5aa2
Cast request ids to int
2017-01-26 18:34:11 +00:00
Jaydeep Rami
615ba59ebb
Fixed issue #12986
2017-01-26 23:21:34 +05:30
Justin Shreve
0b1685c76b
Remove variation get_name, it will get it from parent.
2017-01-26 07:48:04 -08:00
Justin Shreve
7b1adfb98f
Bake out of get_title deprecation changes
2017-01-26 07:46:59 -08:00
Mike Jolley
40e9eabf9f
Merge pull request #12983 from woocommerce/get_tax_classes
...
WC_Tax::get_tax_class_slugs()
2017-01-26 14:10:04 +00:00
Mike Jolley
9eaffcde42
Merge pull request #12980 from woocommerce/fix/payment-token-update-props
...
When updating payment tokens, only update the props that have changed & fire off a hook of the changed props.
2017-01-26 14:06:44 +00:00
Justin Shreve
e176f008b8
Add some comments for the return value of get_tax_classes and get_tax_class_slugs
2017-01-25 13:48:29 -08:00
Justin Shreve
474a307420
Introduce get_tax_class_slugs.
2017-01-25 13:38:13 -08:00
Justin Shreve
e8237eab3d
Merge pull request #12965 from woocommerce/update/duplicate-product
...
Update WC_Admin_Duplicate_Product to use CRUD.
2017-01-25 12:18:49 -08:00
Justin Shreve
bcae0166fd
Fix spacing error, return objects on our new hook, and force sku to be unique when duplicating.
2017-01-25 11:44:27 -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
aadc1094e0
Merge pull request #12939 from maximus80/carousel-filter
...
add animationLoop to woocommerce_single_product_carousel_options filter
2017-01-25 00:47:34 +00:00
Mike Jolley
0df50c59a3
Merge pull request #12972 from woocommerce/log-handler-interface
...
Add log handler interface
2017-01-25 00:42:50 +00:00
Mike Jolley
e9b0fba63c
Merge pull request #12953 from pierrebuet/master
...
Updating the way select2 v4 loads translated strings
2017-01-25 00:22:47 +00:00
Mike Jolley
3a104df5bd
Merge pull request #12966 from thenbrent/dry_get_data
...
Remove redundant WC_Product::get_data() method
2017-01-25 00:12:16 +00: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
76f5bc9b79
Merge pull request #12971 from thenbrent/add_read_extra_data
...
Add WC_Product_Data_Store_CPT::read_extra_data()
2017-01-25 00:08:18 +00:00
Jon Surrell
65b5e4181f
Use __METHOD__ over "{$class}::{$method}"
2017-01-24 23:09:24 +01:00
Jon Surrell
2bd8b6efbc
Validate handlers implement WC_Log_handler_Interface
...
Add tests for interface validation.
2017-01-24 23:07:58 +01: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
10d3e2d580
Update WC_Admin_Duplicate_Product to use CRUD.
2017-01-24 11:57:48 -08:00
Justin Shreve
dcecf0f228
Fix get_hook_prefix format
2017-01-24 11:02:06 -08:00
Brent Shepherd
2cf401f60f
Delete WC_Product::get_data()
...
It's identical to WC_Data::get_data(), which is already inherited from
WC_Abstract_Legacy_Product (which extends WC_Data::get_data()).
2017-01-24 10:44:51 -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
Jon Surrell
8e0f40d3d1
Add WC_Log_Handler_Interface
...
Abstract class `WC_Log_Handler` implements interface
2017-01-24 14:10:05 +01:00
Mike Jolley
eb2b9d78f8
Merge pull request #12947 from woocommerce/improve-rest-api-error-data
...
Allow pass error data using WC_Data_Exception
2017-01-24 12:45:49 +00:00
Justin Shreve
711a381ff6
Remove error log
2017-01-23 13:16:49 -08:00
Claudio Sanches
f345285c2e
Merge pull request #12951 from woocommerce/emails-using-site-language
...
Send emails using site language
2017-01-23 19:10:39 -02:00
Justin Shreve
3d55efffac
Move order logic to wc-order
2017-01-23 13:08:55 -08:00
pierrebuet
41a937041d
Updating the way select2 v4 loads translated strings
...
Correcting Issue #12952 .
In select2 v4 the callback functions used to format the messages have
changed their names and the structure of the options have changed,
using now a „language“ object.
I was not able to find a reference in the select2 v4 code how to format
the number of matches back. Further when using v4 I don’t see any
indication on the number of the number of returned matches, so I
consider the parameter as obsolete.
2017-01-23 22:04:52 +01:00
Claudio Sanches
c94bb423f5
Merge pull request #12944 from woocommerce/fix-product-categories-parent
...
[REST API] Fixed PHP notices while trying to set product category parent as 0
2017-01-23 18:46:10 -02:00
Claudio Sanches
3e60bd64de
Send emails using site language, closes #12931
2017-01-23 18:40:36 -02: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
Claudio Sanches
bac0b299c4
Include conflicted product ID when trying to create a product with duplicated SKU
2017-01-23 17:34:49 -02:00
Claudio Sanches
cdf59d6f68
E[REST API] Use WC_Data_Exception->getErrorData
2017-01-23 17:32:33 -02:00
Claudio Sanches
e23ddabfea
Allow WC_Data_Exception have extra error data
2017-01-23 17:29:16 -02:00
Claudio Sanches
03b34fb738
[REST API] Improved messages for term_exists error
2017-01-23 17:07:36 -02:00
Jon Surrell
72f4bcc292
Protect WC_Logger::should_handle
...
This method should not be public. It is not part of WC_Logger_Interface, and leaving it
public could cause problems
2017-01-23 19:59:01 +01:00
Claudio Sanches
10a9baeada
[REST API] Fixed PHP notices while trying to set product category parent as 0
2017-01-23 16:44:22 -02:00
Claudio Sanches
09123c9fc8
Merge pull request #12926 from woocommerce/fix-12910
...
Use mb_ functions in wc_get_wildcard_postcodes
2017-01-23 15:48:59 -02:00
Maximus80
21a14b8636
add animationLoop to woocommerce_single_product_carousel_options filter
2017-01-23 14:24:39 +01: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
Mike Jolley
66914966fb
Adjust meta saving code throughout
...
#12885
2017-01-23 11:30:53 +00:00
Mike Jolley
d8bd80fbb7
Merge pull request #12885 from woocommerce/fix/shipping-rate-meta-data
...
Add shipping rate meta data to line item
2017-01-23 10:53:24 +00:00
Mike Jolley
cd05b94ec3
woocommerce_admin_process_product_object hook
2017-01-23 10:20:11 +00:00
Mike Jolley
ba7513ed82
wc_format_decimal should remove % symbols
...
Fixes #12893
2017-01-22 01:35:14 +00:00
Mike Jolley
f0049367ae
Use mb_ functions and add tests
2017-01-22 01:24:20 +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
90764253bc
Merge pull request #12903 from thenbrent/fix_wc_paying_customer
...
[2.7] Fix wc_paying_customer() refund check
2017-01-20 10:45:22 +00: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
Mike Jolley
e8115c654d
Merge pull request #12905 from thenbrent/use_wc_format_price_range
...
[2.7] Fix get_price_html_from_to() deprecation
2017-01-20 10:42:29 +00:00
Mike Jolley
fc02cc80a8
Merge pull request #12888 from woocommerce/get_order_id_by_order_item_id
...
Add method for getting order id from order item id.
2017-01-20 10:39:13 +00:00
Mike Jolley
b2e6fa8c4e
Merge pull request #12897 from hannahswain/master
...
Update capitalization on "Visit store" menu link
2017-01-20 10:38:48 +00:00
Mike Jolley
d757b85167
Merge pull request #12883 from woocommerce/order-tracking-messages
...
Use notices functions in order tracking
2017-01-20 10:38:02 +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
Brent Shepherd
a1cd7eee42
Fix get_price_html_from_to() deprecation
...
WC_Product::get_price_html_from_to() was incorrectly using
wc_format_sale_price() as its replacement in WC 2.7; however,
wc_format_price_range() is a more suitable replacement.
2017-01-19 13:51:23 -08:00
Brent Shepherd
3f338cd3e1
Fix wc_paying_customer() refund check
...
wc_paying_customer() needs to check against 'shop_order_refund', which is
the actual return value of WC_Order_Refund::get_type(). No object will return
'refund', so a customer would always be declared as a paying customer even
for refund orders.
2017-01-19 11:16:43 -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
Hannah Swain
c22b1d766a
Update class-wc-admin-menus.php
...
Capitalize "s" in "Visit store" to match case on "Visit Site".
2017-01-19 14:47:29 +01:00
Claudio Sanches
9d513737ed
Merge pull request #12887 from woocommerce/fix/order-item-type-array
...
Return order item type if accessed via array.
2017-01-18 20:43:25 -02:00
Justin Shreve
663a096429
Return order item type if accessed via array (bw compat).
2017-01-18 13:49:12 -08:00
Nabeel Sulieman
3c8ce9b494
Add shipping rate meta data to line item
2017-01-18 10:41:32 -08:00
Claudio Sanches
bff95262cb
Changelog for 2.6.13
2017-01-18 16:20:48 -02:00
Claudio Sanches
d536d15652
Merge branch 'master' of github.com:woocommerce/woocommerce
2017-01-18 16:01:02 -02:00
Claudio Sanches
f54e9e1e1a
Fixed coding standards
2017-01-18 15:16:01 -02: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
Claudio Sanches
fe97e1f5b3
Merge pull request #12866 from woocommerce/wc_get_orders_before_and_after_date
...
Add before and after date arguments to wc_get_orders
2017-01-18 14:52:51 -02:00
Claudio Sanches
ddc8ce93a4
Use notices functions in order tracking, closes #12874
2017-01-18 14:45:20 -02:00
Claudio Sanches
11035ba4d7
Fixed "stock increase" string placeholders, closes #12873
2017-01-18 14:34:52 -02:00
Mike Jolley
f9f6ac175b
Merge pull request #12865 from woocommerce/remove-default-instructions
...
Removed default instructions
2017-01-18 10:31:21 +00:00
Justin Shreve
b660eda4b8
Add date searching to wc_get_orders.
2017-01-17 12:52:27 -08:00
Claudio Sanches
ac3d847a16
Fixed file permissions
2017-01-17 16:31:31 -02:00
Claudio Sanches
61b39c206f
Removed default instructions, closes #12853
2017-01-17 16:11:49 -02:00
Mike Jolley
17481af671
Allow html in description
2017-01-17 15:50:19 +00:00