Mike Jolley
4dea9d7b81
Merge pull request #13100 from divadmts/fix-external
...
External product add_to_cart_text function's hook used
2017-02-07 13:43:54 +01:00
Mike Jolley
a4f87293ca
Inherit shipping class id from parent
2017-02-07 12:35:24 +00:00
Mike Jolley
b14d1ecbc9
Merge pull request #13101 from woocommerce/fix-13051
...
Exit after redirect to prevent incorrect headers being set by wp_die
2017-02-06 19:12:17 +01:00
Mike Jolley
c61b4bf35c
wc_add_to_cart_message_html filter which passes in full array of products and qty
...
Closes #12824
2017-02-06 18:11:54 +00:00
Claudiu Lodromanean
e45adc14ed
Bring up-to-date with master
2017-02-06 10:10:41 -08:00
Mike Jolley
23cc478bc9
Exit after redirect to prevent incorrect headers being set by wp_die
2017-02-06 17:59:31 +00:00
Mike Jolley
b19be41994
Added since to WC_Data docblocks
...
Closes #13056
2017-02-06 17:06:20 +00:00
divadmts
8df243fdbf
use woocommerce_product_add_to_cart_text hook
2017-02-07 01:04:34 +08:00
Mike Jolley
c44fffe35b
If woocommerce_adjust_non_base_location_prices is false, remove modded tax, not base tax
2017-02-06 16:56:14 +00:00
Mike Jolley
32d5e3d6f0
Merge pull request #13076 from woocommerce/fix/shipping-total-when-no-shipping-methods
...
Fix empty string case for `WC_Order::get_total_shipping`
2017-02-06 16:29:20 +01:00
Boro Sitnikovski
5a0b70f291
Fix empty string case for `WC_Order::get_total_shipping`
2017-02-06 14:41:19 +01:00
Mike Jolley
1ef593ff16
Merge pull request #13046 from thenbrent/merge_extra_data
...
Merge WC_Data::$extra_data in WC_Data::__construct()
2017-02-06 13:08:53 +01:00
Mike Jolley
1f89d2f22e
Merge pull request #13063 from thenbrent/remove_unused_param
...
Remove 'edit' param from calls to WC_Product_Variable::get_visible_children()
2017-02-06 12:55:53 +01:00
Mike Jolley
09f7b0493e
Merge pull request #13042 from woocommerce/legacy-order-date-format
...
Fix legacy order dates format
2017-02-06 12:51:41 +01:00
Mike Jolley
908439c972
Merge pull request #13036 from chrislam/fix/ambiguous-column-names
...
Added table alias so that the column names in the `ORDER BY` and `GROUP BY` clauses are not ambiguous
2017-02-06 12:51:24 +01:00
Mike Jolley
58118997a9
Merge pull request #13069 from jaydeeprami/Fix-Issue-13067
...
Fixed issue ref #13067
2017-02-06 12:36:53 +01:00
Jaydeep
91cd899989
Fixed issue ref #13067
2017-02-06 14:35:55 +05:30
Brent Shepherd
f768f9f04b
Add new variable product sync hook
...
To provide a way for callbacks to modify the actual instance of the
variable product being sync'd, especially before its saved, in case
it needs to sync some meta data or other prop that can be set on the
object itself.
2017-02-03 15:30:56 -08:00
Brent Shepherd
a6bed34358
Remoe unused 'edit' param
...
To avoid a merge conflict with #13063
2017-02-03 15:10:19 -08:00
Brent Shepherd
7e61cb8a24
Trigger variable product sync hook after save
...
Because only a product ID is passed to callbacks on 'woocommerce_variable_product_sync',
they will need to instantiate their own instance of the product to do anything useful
with it. This creates a lot of potential for problems given that the product has at that
stage had its data sync'd but not all of it saved. For example, a callback may modify some
meta data on its own instance of the product, then save that, only to immediately have
that overridden if the instance of $product in WC_Product_Variable::sync() also had changes
to that meta data.
Instead, trigger 'woocommerce_variable_product_sync' only after the product has been
saved. This is backward compatible because the hook was triggered at the very end of
the process in WC < 2.7.
2017-02-03 15:01:36 -08:00
Brent Shepherd
8431b2ac86
Remove 'edit' param on get_visible_children()
...
The WC_Product_Variable::get_visible_children() method accepts no parameters.
2017-02-03 14:53:03 -08:00
Mike Jolley
497b4d986c
Merge pull request #13047 from thenbrent/backward_compat_for_email_order_items
...
Reinstate old show/hide logic for download links and purchase notes in email order item table
2017-02-03 11:02:17 +01:00
Mike Jolley
244b42eae8
Merge pull request #13048 from woocommerce/fix/cart-discount-call
...
Fix call to non-existent method for cart_discount.
2017-02-03 11:00:54 +01:00
Brent Shepherd
4147935990
Fix undefined index notice in WC_Webhook
2017-02-02 12:52:00 -08:00
Brent Shepherd
fe7e280ea0
Reinstate woocommerce_email_order_items_args hook
2017-02-02 12:26:59 -08:00
Claudio Sanches
5eb08aeda6
[REST API] Cast int for batch delete
2017-02-02 19:09:45 +01:00
Mike Jolley
2ec4b8cf7f
Revert "Get rating count should use is_array"
...
This reverts commit 0625a2b759
.
2017-02-02 18:43:43 +01:00
Mike Jolley
0625a2b759
Get rating count should use is_array
2017-02-02 18:35:30 +01:00
Boro Sitnikovski
5f05b2e3d8
Fix call to non-existant method for cart_discount.
2017-02-02 09:45:09 +01:00
Brent Shepherd
75bcbbf959
Maintain old show/hide email order item logic
...
When SHA: 7b3a9b introduced wc_get_email_order_items(), it slightly
changed the logic applied to determine whether to display:
* download links; and
* purchase notes.
In WC 2.6.13 and older, WC_Abstract_Order::email_order_items_table()
would only display download links and purchase note in emails *not*
sent to the admin. This patch preserves that behaviour.
2017-02-01 18:12:21 -08:00
Brent Shepherd
010a208e88
Merge WC_Data::$extra_data in WC_Data::__construct
...
Rather than requiring child classes to merge it as well as define it.
If it's not defined in a child class, then the merge call will have no
effect as it will be an the empty array set in WC_Data, if they do define
it, WC_Data will now take care of it automatically rather than requiring
manually merging it in the child class's constructor before it has any
effect on that objects data.
This helps reduce duplicate code by removing this from child classes, and
in some cases, being able to remove the child constructor definitions
entirely. It also avoids a gotcha for developers setting their own
$extra_data values only to find they aren't being set on the $data
property.
2017-02-01 12:48:27 -08:00
Mike Jolley
e46b256c67
Use cron to send emails to avoid long page load times on checkout
2017-02-01 20:08:18 +01:00
Mike Jolley
ed51c8ac13
Pass order object to emails
2017-02-01 17:54:47 +01:00
Mike Jolley
3529d7cafd
Cache items
2017-02-01 14:54:18 +01:00
Mike Jolley
31308403d4
Use variables to save values in item crud.
2017-02-01 10:53:53 +01:00
Claudiu Lodromanean
9fadeacfdc
Tweak shipping zones button styling to handle RTL better
2017-02-01 10:25:42 +01:00
Claudio Sanches
54e35648e2
Fixed legacy date format
2017-02-01 10:11:19 +01:00
Claudio Sanches
247c9aff50
Merge pull request #13032 from woocommerce/fix/order-date-direct-access
...
Fix direct access to order_date property
2017-02-01 10:00:06 +01:00
Claudio Sanches
79256504a1
[REST API] Products endpoint fixes, closes #13031
2017-02-01 09:58:04 +01:00
Mike Jolley
3a3588c92c
Check product once
2017-02-01 02:11:56 +01:00
Mike Jolley
5a2b07763d
Update metadata directly
2017-02-01 02:03:18 +01:00
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
Brent Shepherd
7a7c0fbce6
Add WC_Abstract_Order::get_valid_statuses()
...
So that classes which extend WC_Abstract_Order can define custom statuses
specifically for their order type and have those used for validation in
WC_Abstract_Order::set_status() instead of only the order statuses defined
by wc_get_order_statuses().
For example, the subscription order type has a number of custom order statuses,
like 'wc-active' and 'wc-expired', which do not apply to orders but are valid
statuses for WC_Subscription objects, which extend WC_Abstract_Order.
2017-01-31 15:00:03 -08:00
Chris Lam
502fa930ba
Fixes #13035 - Added table alias so that the column names in the `ORDER BY` and `GROUP BY` clauses are not ambiguous
2017-02-01 11:58:54 +13:00
Boro Sitnikovski
58d7e6d940
Fix direct access of order_date property
2017-01-31 17:29:09 +01:00
Mike Jolley
5b221b4ed0
Edit context
...
#12936
2017-01-31 17:26:49 +01:00
Mike Jolley
efcbdc3031
Tweaks for #12805
...
Closes #12805
2017-01-31 17:25:57 +01:00
Claudiu Lodromanean
da22e021f9
Tweak admin tabs CSS to look good in LTR and RTL modes.
2017-01-31 10:09:56 +01:00
Mike Jolley
724f832b40
Fix get_template_loader_files
...
Fixes #12958
2017-01-31 09:56:27 +01:00
Mike Jolley
22260bfb96
Merge pull request #13021 from Chouby/ajax_wp_die
...
Use wp_die instead of die in ajax responses
2017-01-31 09:45:46 +01:00
Mike Jolley
a4b3244d7b
Merge pull request #13028 from woocommerce/fix-13027
...
Allow password resets when account page isn’t set
2017-01-31 09:45:16 +01:00
Mike Jolley
429b7534bb
Merge pull request #13029 from woocommerce/fix-13025
...
Fix wording on deprecation messages
2017-01-31 09:39:57 +01:00
Mike Jolley
dee73d4056
Use edit context on load
...
Closes #12936
2017-01-31 09:39:19 +01:00
Caleb Burks
df7f3533bc
Fix wording on deprecation messages
2017-01-30 23:40:21 -06:00
Caleb Burks
9b22886a0d
Allow password resets when account page isn’t set
2017-01-30 22:59:32 -06:00
Mike Jolley
55c9554ace
Use MDL
...
Closes #13016
2017-01-30 10:35:47 +01:00
Frédéric Demarle
4075024bb9
Use wp_die intead of die in ajax responses
2017-01-29 21:43:25 +01:00
Frédéric Demarle
e03000126e
Check SHOP_IS_ON_FRONT existence before defining it
2017-01-29 21:32:26 +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
Claudio Sanches
346e1ea1e0
Merge pull request #12996 from woocommerce/rest-api-missing-types-args
...
REST API Types
2017-01-27 14:49:35 -02:00
Mike Jolley
6a997ec6b2
Merge pull request #13001 from thenbrent/honour_default_checkout_get_value
...
Honour default checkout_get_value
2017-01-27 16:42:32 +00:00
Mike Jolley
365b456fa5
Make sure product is set.
2017-01-27 16:39:53 +00:00
Claudio Sanches
24a5fe7592
Make WC_REST_Exception extend WC_Data_Exception
2017-01-27 13:52:21 -02:00
Mike Jolley
4abe2b8025
Disable smooth height for #12868
2017-01-27 15:37:35 +00:00
Mike Jolley
46367710ee
Default themes get theme support
2017-01-27 15:35:06 +00: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
Mike Jolley
bf24ba395d
Use get_theme_support for gallery features
2017-01-27 14:13:54 +00: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
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
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
Claudiu Lodromanean
97497e3104
12170 Update doc blocks with new params
2017-01-23 07:54:14 -08: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
Claudiu Lodromanean
754a12c88a
12170 Set up RTL generation and enqueuing
2017-01-20 10:29:48 -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
Mike Jolley
cb04d5985a
Fix add zone button and default title
...
Fixes #12829
2017-01-17 15:25:12 +00:00
Mike Jolley
d92447713a
Merge pull request #12852 from woocommerce/fix-terms-ordering
...
Restore attributes ordering
2017-01-17 12:28:41 +00:00
Mike Jolley
a276d459ed
Merge pull request #12851 from woocommerce/rest-api-search-by-multiple-skus
...
[REST API] Allow search by multiples SKUs
2017-01-17 12:22:39 +00:00
Mike Jolley
4eac304388
Merge pull request #12814 from woocommerce/fix-product-variable-filters
...
Remove deprecation notices on woocommerce_get_children
2017-01-17 10:19:17 +00:00
Claudio Sanches
bd655af072
Restore attributes ordering, closes #12847
2017-01-16 21:11:56 -02:00
Claudio Sanches
c001b508d5
Merge branch 'master' into fix/stock-bulk
2017-01-16 20:41:33 -02:00
Claudio Sanches
3d352a680c
[REST API] Allow search by multiples SKUs
2017-01-16 20:35:55 -02:00
Claudio Sanches
20032fd170
Fixed declaration of is_on_sale() compatible with WC_Product::is_on_sale
2017-01-16 19:59:53 -02:00
Claudio Sanches
fbfb195f2f
Fixed interfaces file names and location
2017-01-16 19:33:21 -02:00
roykho
11d0d26df7
Fix typo on variable when it should be
2017-01-16 12:54:59 -08:00
Justin Shreve
fab2e52bdd
Remove deprecation filters.
2017-01-16 11:06:25 -08:00
Justin Shreve
3e92ec9d59
Fix stock updating on bulk edit.
2017-01-16 10:57:14 -08:00
Justin Shreve
cabff4fe28
Fix stock, virtual, and featured checks by passing correct data to quick-edit.js
2017-01-16 09:59:56 -08:00
Justin Shreve
b7305b835d
Merge pull request #12835 from franticpsyx/update-price-meta-context
...
[2.7] Prices retrieved in 'edit' context when writing meta
2017-01-16 08:52:24 -08:00
Manos Psychogyiopoulos
892d5da7e9
get prices in 'edit' context when updating meta
2017-01-16 17:33:30 +02:00
Jon Surrell
7822c38a2c
Accept object from woocommerce_logging_class filter
...
The filter `woocommerce_logging_class` allows replacement of the
built in `WC_Logger` as the shared logger. However, we statically
instantiate the classname as `$logger = new $class`. This prevents
use of any class which needs to be instantiated with arguments.
This change allows the `woocommerce_logging_class` filter to provide
an object which will be used as the shared logger.
2017-01-15 13:41:21 +01:00
Claudio Sanches
366011ab20
Defined context for shipping packages names
2017-01-15 01:46:02 -02:00
Claudio Sanches
08644c6f42
Missing space
2017-01-15 00:21:02 -02:00
Jon Surrell
ef9624efff
Ensure filter provided logging class implements WC_Logger_Interface
2017-01-14 18:39:40 +01:00
Jon Surrell
144ea5d5ab
Include WC_Logger_Interface on startup
2017-01-14 17:58:24 +01:00
Jon Surrell
bd090749ec
Add WC_Logger_Interface
...
`class WC_Logger implements WC_Logger_Interface`.
The built-in logger can be replaced "globally" (when
provided via `wc_get_logger`) by using the filter
`woocommerce_logging_class`. This interface should make replacing
`WC_Logger` easier and safer.
2017-01-14 17:43:15 +01:00
Claudio Sanches
022d4fdac4
Coupon expiry date do not allow multiple date formats
2017-01-14 00:10:51 -02:00
Claudio Sanches
a5055ec2cf
Merge pull request #12815 from woocommerce/fix-tool-command-notice
...
Fix notice that displays when activating WC via the command-line.
2017-01-13 22:52:33 -02:00
Justin Shreve
9dc38fcee0
Fix notice that displays when activating WC via the command-line.
2017-01-13 10:47:10 -08:00
Claudio Sanches
12481a2be7
Merge pull request #12808 from woocommerce/restore-logger-rm-clear
...
Restore WC_Logger remove and clear functionality
2017-01-13 13:14:27 -02:00
Jon Surrell
5d7665671c
Remove WC_Logger::remove
...
This method was added post 2.6 and does not need to be maintained/deprecated.
Remove related test.
2017-01-13 06:48:57 +01:00
Jon Surrell
78a6ed4d44
Restore remove and clear functionality to WC_Logger
...
Maintain backwards compatibility of removing or clearing files.
2017-01-12 22:13:42 +01:00
Jon Surrell
a2dea96430
Add message when get_log_file_path called too early
2017-01-12 22:02:31 +01:00
Claudio Sanches
9c27661dea
Synchronized with master
2017-01-12 17:53:15 -02:00
Jon Surrell
e8fd29520f
Un-deprecate wc_get_log_file_path
2017-01-12 20:39:39 +01:00
Claudio Sanches
9f1e0c46fa
Fixed wc_get_product_terms() when using menu_order ordering
2017-01-11 16:14:28 -02:00
Mike Jolley
91c68d211f
Merge pull request #12798 from woocommerce/orphan-variations-fix-12614
...
Orphan variations fix
2017-01-11 16:23:14 +00:00
Mike Jolley
748db4e675
Defer flush so CPT is updated before flush.
...
Fixes #12787
2017-01-11 16:12:00 +00: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
dc82ea9c77
Add some functions to handle unique sku after untrash
2017-01-11 15:41:31 +00:00
Mike Jolley
80f79ae98d
Trash and untrash variations handling
...
Fixes #12774
2017-01-11 15:41:19 +00:00
Claudio Sanches
fff98a9fbd
Removed more legacy $woocommerce variable
2017-01-11 13:31:31 -02:00
Claudio Sanches
612b54f0df
Removed dead $woocommerce variable
2017-01-11 13:29:34 -02: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
b240e10b91
Merge branch 'pr/12756'
2017-01-11 12:19:30 +00:00
Mike Jolley
3e31f2f361
Syntax
2017-01-11 12:19:23 +00:00
Mike Jolley
11015c4b06
Pass products around and change how wc_format_stock_for_display gets called so $product is available.
2017-01-11 12:17:18 +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
19913f4d6c
Handle variation type change event
2017-01-11 11:48:22 +00:00
Mike Jolley
61ce6a2d21
remove notice text
2017-01-11 11:48:11 +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
Mike Jolley
8212611307
Merge pull request #12795 from woocommerce/check-post-type
...
Check post type during read of coupons, posts, and products.
2017-01-11 11:05:10 +00:00
Chouby
1a1a152e2e
Fix duplicate_post_taxonomies() when using non unique slugs
...
Since WP 4.3, it is possible to use non unique terms slugs in the same taxonomy. Currently duplicate_post_taxonomies() uses the term slug in wp_set_object_terms(), thus may set a wrong term. I propose to use term_id instead, which ensures that the correct term is set.
2017-01-11 09:32:12 +01:00
Justin Shreve
cddcb7841e
Check post type during read of coupons, posts, and products.
2017-01-10 14:43:33 -08:00
Claudio Sanches
7d090957c8
Merge pull request #12794 from shivapoudel/wc-pages
...
Tweak - Exclude profile pages from WC pages
2017-01-10 16:37:12 -02:00
Shiva Poudel
8171c73e9b
Tweak - Exclude profile pages from WC pages using array_diff
2017-01-10 21:55:11 +05:45
Mike Jolley
00250e8eab
Fix date query format
2017-01-10 15:50:05 +00:00
Claudio Sanches
4b3c44fea3
Merge pull request #12791 from mattallan/system_status_endpoint_editable
...
Make the `GET /system_status` API response more customisable
2017-01-10 12:30:35 -02:00
Mike Jolley
451199a388
Hooks when creating refunds
2017-01-10 14:14:05 +00:00
Mike Jolley
5bfb372f01
Customer update hook
2017-01-10 14:14:05 +00:00
Mike Jolley
b97f6c9eb1
wc_bool_to_string handling for 'true'
2017-01-10 14:14:05 +00:00
matttallan
c45d81e650
Make the system_status GET endpoint more customisable
2017-01-10 16:06:09 +10:00
Diego Zanella
de02645544
Improved filter `woocommerce_layered_nav_link`
...
* Added term and taxonomy as additional parameters.
2017-01-09 19:27:01 +00:00
Claudio Sanches
ca47661388
Fixed WC_Product::get_price_html_from_text deprecated message, closes #12779
2017-01-09 15:52:17 -02:00
Manos Psychogyiopoulos
022fbe4183
add 'include' arg to wc_get_products
2017-01-09 14:10:47 +02:00
Manos Psychogyiopoulos
bffdc27e8c
fix variation attributes display in stock reports
2017-01-09 12:03:08 +02:00
Jon Surrell
acd338fb87
Add default source to WC_Log_Handler_DB
2017-01-08 21:42:56 +01:00
Jon Surrell
f1a90d6b05
Move level filters to dropdown
...
Drop table list "views" and use dropdown filter for sources and levels.
2017-01-08 19:32:53 +01:00
Jon Surrell
a992084776
Sort by timestamp by default
2017-01-08 18:55:21 +01:00
Jon Surrell
0aab3282f4
Add more sanitizing
...
These values should be controlled, but additional sanitization is preferable.
2017-01-08 18:53:01 +01: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
Kathy Darling
8d4844a31c
space after parens
2017-01-06 14:39:02 -05:00
Mike Jolley
66c3cff76d
More escaping
2017-01-06 14:09:36 +00:00
Mike Jolley
76f8c3dddd
Escaping for scruitinizer
2017-01-06 12:45:28 +00:00
Mike Jolley
54352de9b4
Merge pull request #12767 from woocommerce/deprecated-actions
...
Add hooks when error_logging deprecation notices on AJAX calls.
2017-01-06 12:05:16 +00:00
Mike Jolley
f03e09e791
Comment
2017-01-06 11:59:05 +00:00
Justin Shreve
39fe17ec45
Add hooks when error_logging deprecation notices on AJAX calls.
2017-01-05 10:54:10 -08:00
Mike Jolley
f7d72afcf9
Detect classname when saving attributes
2017-01-05 16:54:47 +00:00
Mike Jolley
ee7ee26278
Add static method to get a filtered product classname
2017-01-05 16:54:33 +00:00
Mike Jolley
813ec28c7b
Remove type check in link_all_variations
2017-01-05 16:17:46 +00:00
Mike Jolley
fdbb36bb93
Support deprecated args again
2017-01-05 16:16:19 +00:00
Jon Surrell
d38e22329f
Replace count with empty check
2017-01-05 16:33:58 +01:00
Jon Surrell
e6bcc1aeb6
Replace 'All' with 'All sources' in dropdown
2017-01-05 16:23:03 +01:00
Mike Jolley
17f78d9668
Fallback to full image
...
Closes #12759
2017-01-05 14:31:04 +00:00
Mike Jolley
f7abf29f25
Merge pull request #12754 from woocommerce/sync-variation-names-12707
...
Sync variation names
2017-01-05 12:15:06 +00:00
Justin Shreve
e4937b898d
Fix PHP 7.1 warnings/notices.
2017-01-04 10:45:45 -08:00
Kathy Darling
ff0926aa2d
use wc_format_stock_quantity_for_display() to wrap stock quantity numbers for front end display. closes #12753 .
2017-01-04 12:25:28 -05:00
Mike Jolley
5dba3d5bfe
Sync variation names
2017-01-04 15:18:02 +00:00
Mike Jolley
ec41ba9ff0
delete, don't trash, variations
2017-01-04 14:05:13 +00:00
Mike Jolley
5272f836a4
Merge branch 'read-price-data-caching'
2017-01-04 13:56:14 +00:00
Mike Jolley
564d3f4e33
Feedback
2017-01-04 13:56:07 +00:00
Mike Jolley
13018752ea
Merge pull request #12744 from woocommerce/fix/distinct-12689
...
Update wc_terms_clauses query
2017-01-04 10:47:49 +00:00
Mike Jolley
d84a3bc45b
Merge pull request #12751 from bekarice/wc-2-7-fix
...
[2.7] Fix undefined variable notice
2017-01-04 10:47:22 +00:00
Beka Rice
85f06d7d02
[2.7] Fix undefined variable notice
2017-01-03 18:08:37 -05:00
Justin Shreve
94a33b694c
Separate status and post_status in legacy output. status should match get_status exactly.
2017-01-03 14:04:41 -08:00
Manos Psychogyiopoulos
af378a619d
fix undefined qty_ordered variable
2017-01-03 21:40:06 +02:00
Justin Shreve
c560a65e1b
Merge pull request #12742 from jtsternberg/patch-1
...
Add the shortcode name param to shortcodes where it is missing and `shortcode_atts` call where it is missing.
2017-01-03 11:05:48 -08:00
Justin Shreve
3513f50e55
Add tm.meta_value to the DISTINCT list since it is being used in the ORDER BY clause.
2017-01-03 10:43:48 -08:00
Justin Shreve
291a662be1
The WC API returns exclude_product_ids and expiry_date. 2.7 renamed these in the API file, which we should not do until we version the endpoints.
2017-01-03 10:25:36 -08:00
Justin Sternberg
d07d704187
Add the shortcode_atts call to WC_Shortcode_Cart::output
2017-01-03 13:17:04 -05:00
Justin Sternberg
6d21f2170e
Add the shortcode_atts call to WC_Shortcode_Checkout::output
2017-01-03 13:15:26 -05:00
Justin Sternberg
5f92dce1f3
Add the shortcode name param to the woocommerce_order_tracking shortcode
2017-01-03 13:13:27 -05:00
Justin Sternberg
d036123ebf
Add the shortcode name param to the woocommerce_my_account shortcode.
2017-01-03 13:12:12 -05:00
Justin Sternberg
37a387a391
Add the shortcode name param to the WC_Shipping_Legacy_Flat_Rate fee shortcode.
2017-01-03 13:12:00 -05:00
Justin Sternberg
6f5617eb2e
Add the shortcode name param to the fee shortcode.
...
Re: #11447 and #12741
2017-01-03 13:05:43 -05:00
Mike Jolley
fc867c1a58
Return current variations after API update/create
2017-01-03 16:53:49 +00:00
Mike Jolley
31ad64438f
Merge pull request #12737 from bekarice/2-7-undefined-index-fixes
...
Fixes undefined index notices with empty select2
2017-01-03 15:04:21 +00:00
Mike Jolley
2e1e7c0f93
Fix downloads remaining
...
Issues around ‘’ set (unlimited downloads) Fixes #12692
2017-01-03 15:03:55 +00:00
Beka Rice
b8c7d7e771
Fixes undefined index notices with empty select2
2017-01-03 09:16:58 -05: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
Mike Jolley
96876777ef
Merge pull request #12712 from Dartui/master
...
Added email ID to locate core template for email
2017-01-03 11:01:01 +00:00
Mike Jolley
3e10368ad6
Merge pull request #12720 from franticpsyx/delete-vs-trash-object-hooks
...
[2.7] Separate trash and delete CRUD object hooks
2017-01-03 11:00:34 +00:00
Claudio Sanches
c79b4f1fd5
Fixed case for #12645
2017-01-03 00:26:34 -02:00
Claudio Sanches
6d45e531fd
Merge pull request #12734 from corsonr/fix_wizard_tracking_name
...
Updated WooThemes to WooCommerce
2017-01-02 17:09:22 -02:00
corsonr
62c881b3c2
Updated WooThemes to WooCommerce
2017-01-02 17:56:19 +01:00
Jon Surrell
14e5bdcf91
Fix typos
2017-01-02 14:51:56 +01:00
Jon Surrell
4cfc6b4d04
Handle top and bottom bulk actions
2017-01-02 14:42:14 +01:00
Jon Surrell
b4b5c5124a
Refactor WC_Admin_Log_Table_List::prepare_items
...
Extract several methods to simplify structure and flow
2017-01-02 14:42:13 +01:00
akashsonic
202458a1f3
Dynamic add 2 attribute.
...
Add dynamic 2 attributes rows & cols in woocommerce_wp_textarea_input function. User can add dynamic this attributes in text-area field.
2017-01-02 18:01:52 +05:30
Manos Psychogyiopoulos
d250d3f149
distinguish between trash and delete object hooks
2016-12-30 00:22:12 +02:00
Jon Surrell
90ef632fa5
Colorize leveles in db log table
2016-12-29 12:03:59 +01:00
Jon Surrell
a33fac966d
Use plural in multiple log email
2016-12-29 11:58:43 +01:00
Jon Surrell
4cf86ef346
Use constants over settings to configure logger
...
Settings have been removed.
WC_LOG_THRESHOLD and WC_LOG_HANDLER constants have been added.
2016-12-29 11:58:43 +01:00
Jon Surrell
e4681d268b
Remove logging
2016-12-29 11:58:43 +01:00
Jon Surrell
269addd9f8
Rework db log table
...
Change tag from text search to select list.
Flatten and clean up query logic.
Add required methods for source <select>.
2016-12-29 11:58:43 +01:00
Jon Surrell
c633b07f73
Fix style
2016-12-29 11:58:43 +01:00
Jon Surrell
588b1c2267
Format date in log viewer table
2016-12-29 11:58:43 +01:00
Jon Surrell
fbd91fe376
Improve email handler subject
2016-12-29 11:58:43 +01:00
Jon Surrell
4b13e3b053
Do not deprecate WC_Logger::add
2016-12-29 11:58:43 +01:00
Jon Surrell
e4d5886427
Replace log `tag` with log `source`
2016-12-29 11:58:43 +01:00
Jon Surrell
03889f77cc
Update use of deprecated wc_get_log_file_path
2016-12-29 11:58:43 +01:00
Jon Surrell
088fc5cd68
Delay file log write when written too early
...
The function to look up log file paths depends on `wp_hash`, which is pluggable.
Log files cannot be found before `plugins_loaded` action. In case a log is
written to a file before `wp_hash` is available, cache and write on
`plugins_loaded` action.
2016-12-29 11:58:43 +01:00
Jon Surrell
5700043e6d
Deprecate wc_get_log_file_path
...
wc_get_log_file_path moves into `WC_Log_Handler_File` class as a static
method.
Update deprecations and version info.
2016-12-29 11:58:43 +01:00
Jon Surrell
feefabbdf0
Document _legacy context in WC_Log_Handler_File
2016-12-29 11:58:43 +01:00
Jon Surrell
665e8ccfc6
Improve doc comments and access.
2016-12-29 11:58:43 +01:00
Jon Surrell
f908a0181c
Improve deprecation messages for WC_Logger
...
clear and remove *do* have alternatives. They have essentially
been moved to the file handler.
2016-12-29 11:58:43 +01:00
Jon Surrell
6068f681d3
Use 'notice' as level for deprecated WC_Logger::add messages.
...
Notice is the default (and recommended) threshold for production sites. Using
info, which is below notice, would result in ::add messages to be filtered by
default. This would be a confusing experience for users calling the deprecated
function and expecting a log.
2016-12-29 11:58:43 +01:00
Jon Surrell
de076a313e
Fix settings log texts
...
Add 'woocommerce' to __ translated texts.
Improve texts.
2016-12-29 11:58:43 +01:00
Jon Surrell
d4e8bb82e6
Remove new handler arguments from `wc_register_default_log_handler`
2016-12-29 11:58:43 +01:00
Jon Surrell
970a33e182
Cleanup log list table view
...
Format log timestamp.
Add is_valid_level check to $_REQUEST level filter.
General cleanup: formatting, layout, commentary.
2016-12-29 11:58:43 +01:00
Jon Surrell
aee5917440
Change wc_safe_dump to wc_print_r
...
Match print_r arguments, this makes usage obvious.
2016-12-29 11:58:43 +01:00
Jon Surrell
2ae1bc1ab2
Protect methods
2016-12-29 11:58:43 +01:00
Jon Surrell
fe837c5113
Aggregate email handler messages (max: 1 email/request/handler)
...
Update emails accordingly.
Update email handler tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
acc98a1d6a
Mark WC_Log_Handler::format_entry abstract
2016-12-29 11:58:43 +01:00
Jon Surrell
5f24eca7e2
Add delete to db log viewer table
...
Clean up some nonce logic.
Use a single <form> containing log table.
2016-12-29 11:58:43 +01:00
Jon Surrell
9ba616b2c1
Return single instance from wc_get_logger
...
Remove class include from wc_get_logger (should be autoloaded).
Add tests for wc_get_logger.
2016-12-29 11:58:43 +01:00
Jonathan Surrell
4318b3aa53
Improve @return signature on WC_Log_Handler::handle
...
Make meaning of returned bool explicit.
Update WC_Log_Handler_Email::handle accordingly.
via https://github.com/woocommerce/woocommerce/pull/12575#pullrequestreview-12381573
2016-12-29 11:58:43 +01:00
Jon Surrell
81eaa5ae17
Make lot threshold strings translatable
2016-12-29 11:58:43 +01:00
Jon Surrell
080cf8e436
Store log levels as integer representations in database
...
This will allow indexed ordering by severity.
Add WC_Log_Levels::get_severity_level method to translate severity
integers to level strings. The inverse of WC_Log_Levels::get_level_severity.
Add context to tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
78e6cb31a7
Include WC_Log_Handler with other abstracts
2016-12-29 11:58:43 +01:00
Jon Surrell
825d9c9f82
Fix spelling
2016-12-29 11:58:43 +01:00
Jon Surrell
88836b9cca
Drop WP_DEBUG override threshold. Improve logger tests.
...
This may be unexpected behavior for a user, their level is overridden with no
way to change it. It also greatly complicates testing default thresholds.
Dependency on WC_Log_Handler_File has been removed from logger tests.
2016-12-29 11:58:43 +01:00
Jon Surrell
2626c5b3af
Accept explicit handlers and threshold in WC_Logger
2016-12-29 11:58:43 +01:00
Jon Surrell
be38e8f2fe
Add log threshold setting to settings page
2016-12-29 11:58:43 +01:00
Jon Surrell
ffd0d380ee
Remove threshold logic from handlers.
...
Email handler implements threshold logic internally. Other handlers handle all logs received.
Handler constructors have changed.
2016-12-29 11:58:43 +01:00
Jon Surrell
2945b4755f
Add more information about log levels
2016-12-29 11:58:43 +01:00
Jon Surrell
85fa9df7fe
Drop "bubbling" support for logs
...
The concept of bubbling or consuming logs has little benefit for our use case.
Drop support for bubbling and simplify logging.
2016-12-29 11:58:43 +01:00
Jon Surrell
4f77954bc7
Move log levels to independent class
2016-12-29 11:58:43 +01:00
Jon Surrell
ae72ce24c4
Drop `var_dump` as safe dump alternative
...
var_dump does not support returning string representation.
2016-12-29 11:58:43 +01:00
Jon Surrell
d88ea4ecea
Spelling and doc fixes
2016-12-29 11:58:43 +01:00
Jon Surrell
0f13cca921
Use autoloader for log handlers
2016-12-29 11:58:43 +01:00
Jon Surrell
e2f76bcd54
Fix logs-db redirects
2016-12-29 11:58:42 +01:00
Jon Surrell
c633db9d65
Add woocommerce_default_log_handler setting
...
Adds configuration to settings page
Show status-logs page based on settings (unify logs & database logs)
Register default log handler by default
2016-12-29 11:58:42 +01:00
Jon Surrell
44ec07902d
Add confirmation to db log flush
2016-12-29 11:58:42 +01:00
Jon Surrell
9d80017308
Mark db handler add method as static
2016-12-29 11:58:42 +01:00
Jon Surrell
c945d727d5
Add log flushing to db log viewer
2016-12-29 11:58:42 +01:00
Jon Surrell
5e9d4189fb
Include missing 5 in log level severities
2016-12-29 11:58:42 +01:00
Jon Surrell
e42d2e61fd
Update print_r to use wc_safe_dump
2016-12-29 11:58:42 +01:00
Jon Surrell
691c35e97b
Update logger calls
2016-12-29 11:58:42 +01:00
Jon Surrell
66b0620f7c
remove print_r calls from paypal handler
2016-12-29 11:58:42 +01:00
Jon Surrell
96f9de2106
update paypal gateway logs
2016-12-29 11:58:42 +01:00
Jon Surrell
36201d38ec
Update paypal gateway log method
2016-12-29 11:58:42 +01:00
Jon Surrell
7a3c6bcc0c
Fix phpcs issues
2016-12-29 11:58:42 +01:00
Jon Surrell
915266f967
Add wc_safe_dump function
...
Some "safe" server configurations disable certain functions. `wc_safe_dump` attempts to
safely call a series of alternatives suitable for dumping an expression.
2016-12-29 11:58:42 +01:00
Jon Surrell
a0670cfae8
Add woocommerce_format_log_entry filter to base WC_Log_Handler class
2016-12-29 11:58:42 +01:00
Jon Surrell
2283956db6
Provide correct class name to woocommerce_log_handler_set_threshold filter
2016-12-29 11:58:42 +01:00
Jon Surrell
0c5634c99f
Version 1.0.0 for abstract wc log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
d6a6b8771d
Add level views to db log table
2016-12-29 11:58:42 +01:00
Jon Surrell
30fdca65a9
Log viewer via html template
2016-12-29 11:58:42 +01:00
Jon Surrell
bc3f788507
Implements database log viewer
2016-12-29 11:58:42 +01:00
Jon Surrell
f761183363
Update @package for log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
5a9db9738f
Add DB log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
09ea8b074e
Prefer PHP_EOL over "\n"
2016-12-29 11:58:42 +01:00
Jon Surrell
822981c009
Improve handle signature
...
The signature of WC_Log_Handler::handle mirrors log messages which is more intuitive.
Method docblocks have also been improved and are more complete.
2016-12-29 11:58:42 +01:00
Jon Surrell
e7d6a9a48b
Rotate logs
...
WC_Log_Handler_File now includes log rotation.
Add and improve tests.
2016-12-29 11:58:42 +01:00
Jon Surrell
2a6c95b490
Prevent possible undefined index warning
2016-12-29 11:58:42 +01:00
Jon Surrell
75c3e5e8c6
Fix phpcs warning
2016-12-29 11:58:42 +01:00
Jon Surrell
9adb64b6b9
Restore log deletion from admin log viewer page
...
WC_Logger no longer controls logging and has no knowledge of files.
Correctly handle `remove_log` action via file log handler.
2016-12-29 11:58:42 +01:00
Jon Surrell
b645fa06b7
Improve logic for legacy `->add` message formatting
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88318220
2016-12-29 11:58:42 +01:00
Jon Surrell
ad03597a3d
Simplify default log entry format
...
Remove punctuation. Space separate values:
TIMESTAMP LEVEL MESSAGE
2016-12-29 11:58:42 +01:00
Jon Surrell
611577320f
Include site name in log email message
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#discussion_r88213040
2016-12-29 11:58:42 +01:00
Jon Surrell
f0508a0fc6
Improve log email message format.
...
Suggestion via https://github.com/woocommerce/woocommerce/pull/12340#pullrequestreview-8895028
2016-12-29 11:58:42 +01:00
Jon Surrell
e4c08aa03a
Remove optional from required log handler context array
2016-12-29 11:58:42 +01:00
Jon Surrell
722b288b79
Remove _ from private/protected properties
2016-12-29 11:58:42 +01:00
Jon Surrell
fe02d44e31
Defauly log file level is DEBUG
2016-12-29 11:58:42 +01:00
Jon Surrell
b2935f35ed
Fix file handle regression
2016-12-29 11:58:42 +01:00
Jon Surrell
6ec75d8c2e
Change defualt log handler threshold to DEBUG following discussion with team members.
2016-12-29 11:58:42 +01:00
Jon Surrell
b5cebcab6c
Fix scrutinizer issues
2016-12-29 11:58:42 +01:00
Jon Surrell
d5d1ab16ea
Fix docblocks
2016-12-29 11:58:42 +01:00
Jon Surrell
c5c0563f7c
Restore deprecated functions WC_Logger::clear & WC_Logger::remove
...
Also updates clear test to supply required argument.
2016-12-29 11:58:42 +01:00
Jon Surrell
36873e5097
Provide basic messages for email log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
479ef85cd8
Add email log handler
2016-12-29 11:58:42 +01:00
Jon Surrell
864e65de10
Remove redundant __constructor
2016-12-29 11:58:42 +01:00
Jon Surrell
4262a72af6
Use wp_parse_args for default args
2016-12-29 11:58:42 +01:00
Jon Surrell
9dc30a7203
Remove 2nd filter parameter that would never be called
2016-12-29 11:58:42 +01:00
Jon Surrell
44ea69c579
Adds tests for bubbling, etc.
...
Add tests teardown to cleanup log files
Fix errors in log handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
0e0433195d
Add logic for log level filtering to `WC_Log_Handler`.
2016-12-29 11:58:42 +01:00
Jon Surrell
9a0efcfe55
Add abstract WC_Log_Handler class
...
Abstract base class is implemented with default formatting implementations.
`$timestamp` has been added to the `WC_Log_Handler::handle` implementation. This ensures all handlers are passed the same timestamp for the same message.
`_legacy` context has been added to `WC_Log_Handler_File` to ensure handle deprecated `WC_Logger::add` provides the same log entries as before.
Fix CS problems.
2016-12-29 11:58:42 +01:00
Jon Surrell
a2cce14711
Register file log handler by default
...
Add wc_register_file_log_handler function.
Calls add_filter with register function to include handler by default
2016-12-29 11:58:42 +01:00
Jon Surrell
d9dcabf8f2
WC_Logger registers and delegates logging to handlers
2016-12-29 11:58:42 +01:00
Jon Surrell
e922efb0f7
Extract file log handler
2016-12-29 11:58:42 +01:00
Krzysztof Grabania
3a54b24fa1
Added email ID to locate core template for email
...
This PR adds email id to `woocommerce_locate_core_template` filter. It would be useful for custom emails created by plugins, which have got default email templates.
2016-12-28 20:38:51 +01: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
b5c56737c5
merge branch 'master' into fix-product-search-get-post-parent-fatal-error
2016-12-27 10:57:52 +02:00
Manos Psychogyiopoulos
be436b629d
fix include field typo
2016-12-27 10:36:44 +02:00
Manos Psychogyiopoulos
ae9f4eacc4
fix get_post_parent fatal error
2016-12-27 10:34:32 +02:00
Claudio Sanches
539099c7d7
Include $endpoint in woocommerce_endpoint_X_title filter #12676
2016-12-25 20:43:25 -02:00
Mike Jolley
daea231ab7
Merge pull request #12666 from woocommerce/select2-4
...
Upgrade Select2 to V4
2016-12-24 14:40:09 +00:00
Mike Jolley
6b511e84be
Sorting
2016-12-23 15:14:27 +00:00
Mike Jolley
e9be3a425a
Handle search params in filters
...
Closes #12685
2016-12-23 14:45:58 +00:00
Mike Jolley
a3f8ffb101
Ensure price is set
2016-12-23 14:30:47 +00:00
Mike Jolley
a2a16a2ec0
Merge pull request #12683 from franticpsyx/shipping-rate-taxes-array-not-saved
...
[2.7] Shipping order item taxes array not saved on checkout
2016-12-23 14:19:43 +00:00
Mike Jolley
859727d462
Merge pull request #12678 from franticpsyx/rest-api-set-order-item-action
...
[2.7] Add 'woocommerce_rest_set_order_item' REST API hook
2016-12-23 14:18:31 +00:00
Mike Jolley
e8b1fe1bf2
Merge pull request #12679 from franticpsyx/rest-api-totals-excl-tax
...
[2.7] Calculate REST order item totals excluding tax if undefined (?)
2016-12-23 14:17:07 +00:00
Mike Jolley
377bbf7767
Merge branch 'master' into read-price-data-caching
2016-12-23 14:08:08 +00:00
Mike Jolley
ceee6c37ca
Change how non-crud props get stored
2016-12-23 14:06:51 +00:00
Mike Jolley
99527e8013
Merge pull request #12680 from franticpsyx/remaining-incorrect-inline-comments
...
[2.7] Remaining inline comments about pointers
2016-12-22 22:37:33 +00:00
Mike Jolley
364d4bd82c
Merge pull request #12675 from maciekkus/feature/make-tax-includes-text-consistient
...
Make 'includes tax' text wrapping with <small> tag consistient across order and cart table
2016-12-22 22:37:06 +00:00
Maciej Kuś
e5bae8b7af
space preserved before "included_tax" small element
2016-12-22 20:05:46 +01:00
Manos Psychogyiopoulos
d7afab3930
fix saving of shipping order item taxes on checkout
2016-12-22 20:49:42 +02:00
Manos Psychogyiopoulos
40bf6afc29
fix incorrect inline comments
...
Ref: 01aba1fd2b
2016-12-22 19:41:23 +02:00
Manos Psychogyiopoulos
42e09eac32
make rest api order item totals - always excl tax
2016-12-22 19:23:07 +02:00
Manos Psychogyiopoulos
0d6eae5fca
add 'woocommerce_rest_set_order_item' hook
2016-12-22 17:56:14 +02:00
Mike Jolley
01aba1fd2b
Incorrect inline comments
2016-12-22 15:06:10 +00:00
Mike Jolley
03b581f72e
Refunds API/get_data() missing ID
...
Fixes #12672
2016-12-22 14:52:37 +00:00
Mike Jolley
f3dc355632
Check post data is set
...
Closes #12670
2016-12-22 14:41:39 +00:00
Mike Jolley
8f49724b17
Merge pull request #12674 from franticpsyx/rest-api-set-order-item-meta
...
[2.7] REST order item meta not intercepted
2016-12-22 14:38:39 +00:00
Mike Jolley
8f43bb2a6c
Merge pull request #12676 from widoz/master
...
Move the 'woocommerce_endpoint_' . $endpoint . '_title' filter
2016-12-22 14:34:27 +00:00
Mike Jolley
6861131d8f
Fix version check
2016-12-22 14:30:47 +00:00
Mike Jolley
d5b346fc40
Variation specific backwards compatibility
2016-12-22 14:30:47 +00:00
Guido Scialfa
440d407ce5
Move the 'woocommerce_endpoint_' . $endpoint . '_title' filter outside of the default condition, let's filter the titles regardless of the endpoint
2016-12-22 15:25:22 +01:00
Mike Jolley
fd45160439
Merge pull request #12667 from franticpsyx/product-variation-hook-prefix
...
[2.7] Fix product variation hook prefix for consistency
2016-12-22 13:50:38 +00:00
Mike Jolley
c0dd1146ab
Merge pull request #12668 from franticpsyx/woocommerce-get-product-from-item-order-arg
...
[2.7] Use get_order instead of creating object in woocommerce_get_product_from_item args
2016-12-22 13:29:12 +00:00
Maciej Kuś
53c7c4025f
includes tax wrapping <small> consistient across order and cart table
2016-12-22 13:56:29 +01:00
Manos Psychogyiopoulos
dae45b8a29
fix paren position
2016-12-22 14:10:36 +02:00
Manos Psychogyiopoulos
6fc59cf2dc
set REST order item meta
2016-12-22 12:29:57 +02:00
Manos Psychogyiopoulos
02abc9b9eb
use get_order instead of creating new object when applying woocommerce_get_product_from_item
2016-12-21 21:01:47 +02:00
Manos Psychogyiopoulos
63a4cf41d0
fix product variation hook prefix for consistency
2016-12-21 18:06:42 +02:00
Mike Jolley
92968492a0
Customer search
2016-12-21 14:18:33 +00:00
Mike Jolley
96877dbb25
Fix product search inputs
2016-12-21 13:23:26 +00:00
Mike Jolley
56fef5b4f6
More styling settings tweaks
2016-12-21 11:36:48 +00:00
Manos Psychogyiopoulos
1b65b793d2
fix non-object error when clearing transients
2016-12-20 22:29:17 +02:00
Mike Jolley
badf8d7d55
Add select2 script and CSS
2016-12-20 16:45:22 +00:00
Mike Jolley
906499bbb8
woocommerce_ajax_get_customer_details filter and deprecation notice
...
Closes #12654
2016-12-20 16:02:38 +00:00
Mike Jolley
0c65505b1e
Merge pull request #12650 from franticpsyx/deprecate-order-item-qty
...
[2.7] Add backwards compatibility for old order item 'qty' field
2016-12-20 15:49:14 +00:00
Mike Jolley
c29d597986
Merge pull request #12649 from woocommerce/save-actions
...
Add actions for all object types
2016-12-20 15:44:51 +00:00
Mike Jolley
50b1a9d378
woocommerce_update_order
2016-12-20 15:44:37 +00:00
Mike Jolley
13086ba7cd
no class cost logic should only kick in if store has shipping classes.
2016-12-20 15:40:05 +00:00
Mike Jolley
d3709ce0ef
HTTP_X_COUNTRY_CODE
2016-12-20 15:24:30 +00:00
Mike Jolley
6858824de1
missing variable
2016-12-20 13:37:20 +00:00
Mike Jolley
0300464613
Use accounting.js in price slider widget
2016-12-20 13:11:09 +00:00
Mike Jolley
2f9aeed248
Missing variable
2016-12-20 12:48:13 +00:00
Mike Jolley
f67f013957
[2.6] VIP fallback
2016-12-20 11:37:36 +00:00
Mike Jolley
c4cf6ba740
[2.6] Change API fallbacks
2016-12-20 11:37:36 +00:00
Mike Jolley
2ebd83aa2d
Merge pull request #12653 from shivapoudel/blank-state-trash-btn
...
Hide "Empty Trash" button in blank state after removing all data
2016-12-20 11:09:52 +00:00
Mike Jolley
bc24a2e854
BW compat for variable naming
...
@webaware
2016-12-20 11:07:31 +00:00
Mike Jolley
23c500986e
Limit lengths of PayPal Args
2016-12-20 10:58:10 +00:00
Shiva Poudel
d20cdd2830
Hide "Empty Trash" button in blank slate after removing all data
2016-12-20 12:15:17 +05:45
Manos Psychogyiopoulos
e2651d730d
back compat for old order item 'qty' field
2016-12-20 01:06:39 +02:00
Mike Jolley
54ca822e57
Fix variable names
2016-12-19 17:13:25 +00:00
Mike Jolley
20680203bb
Add actions for all object types
2016-12-19 17:09:52 +00:00
Mike Jolley
c78e5cf2ec
Trigger actions after data is saved
...
#12648
2016-12-19 16:40:53 +00:00
Mike Jolley
1795a0f9c3
Remove virtual products from shipping packages
...
Closes #12628
2016-12-19 16:17:50 +00:00
Mike Jolley
a41f9d6ec4
Make sure shipping address is set if needed
2016-12-19 15:42:53 +00:00
Mike Jolley
e5c18fd6e4
Fix currency check unit tests
2016-12-19 15:11:25 +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
Mike Jolley
b81b6c1a44
Create text terms if they do not exist
...
Closes #12631
2016-12-19 13:09:45 +00:00
Mike Jolley
51fc839515
Merge pull request #12645 from MA7/patch-1
...
Update wc-core-functions.php
2016-12-19 12:50:12 +00:00
Masoud Amini
7fac0156fe
Update wc-core-functions.php
2016-12-19 16:10:11 +03:30
Mike Jolley
3f7c1c7087
Fix email address field
...
Fixes #12642
2016-12-19 12:19:44 +00:00
Mike Jolley
587334a567
Merge branch 'pr/12639'
2016-12-19 11:59:17 +00:00
Mike Jolley
5ae62959d8
Notices
2016-12-19 11:59:10 +00:00
Mike Jolley
0246172806
Action comments
2016-12-19 11:58:00 +00:00
Mike Jolley
2e77e38d33
colour -> color
...
#12627
2016-12-19 11:41:48 +00:00
Manos Psychogyiopoulos
87bb9adf08
use CRUD to add line item meta
2016-12-19 13:27:32 +02:00
Mike Jolley
81f4cadf12
Merge pull request #12646 from franticpsyx/add-shipping-package-details-filter
...
Missing commit in #12632 - index package item names by cart item id
2016-12-19 11:23:52 +00:00
Mike Jolley
9617030610
Merge remote-tracking branch 'origin/master'
2016-12-19 11:23:03 +00:00
Mike Jolley
e974682218
Merge branch 'pr/12641'
2016-12-19 11:22:58 +00:00
Mike Jolley
5fc67bbd0c
Unset changes
2016-12-19 11:22:43 +00:00
Mike Jolley
c980817f6d
Merge pull request #12637 from franticpsyx/additional-information-tab-action
...
[2.7] Use 'woocommerce_product_additional_information' action to render attributes
2016-12-19 10:59:15 +00:00
Masoud Amini
72856b1b60
Update wc-core-functions.php
2016-12-19 14:23:56 +03:30
Manos Psychogyiopoulos
62ed6ee9d8
index package item names by cart item id
2016-12-19 12:52:02 +02:00
Manos Psychogyiopoulos
48bf909fa2
use getters/setters in order item offsetset/get
2016-12-18 20:31:52 +02:00
Manos Psychogyiopoulos
03fac5231f
set order item object as read after reading child class data
2016-12-18 20:04:14 +02:00
Manos Psychogyiopoulos
f0aa493a98
order id omitted from woocommerce_add_shipping_order_item args
2016-12-18 18:39:37 +02:00
Manos Psychogyiopoulos
7751264a2a
package not passed in woocommerce_add_shipping_order_item action
2016-12-18 18:36:04 +02:00
Manos Psychogyiopoulos
3a8eae195b
maintain order item meta action hooks
2016-12-18 18:13:11 +02:00
Manos Psychogyiopoulos
af3c24881d
render product attributes in 'woocommerce_product_additional_information' action
2016-12-18 00:53:45 +02:00
Manos Psychogyiopoulos
5bfe614668
add 'woocommerce_shipping_package_details_array' filter
2016-12-17 14:47:43 +02:00
Mike Jolley
a9a21bf9e0
Fix sale date series
...
Fixes #12609
2016-12-16 12:35:33 +00:00
Mike Jolley
d46d00bd08
Order numbers should be a string
...
Closes #12616
2016-12-16 11:49:00 +00:00
Mike Jolley
020a7b518f
Fix API set of reviews_allowed
...
#12618
2016-12-16 11:24:11 +00:00
Mike Jolley
758f3a21a4
Typo
2016-12-16 10:36:21 +00:00
pmaiorana
822c1353af
Removes the State/Province field for Kuwait and Lebanon
...
As noted in support ticket #507320 (and verified) neither Kuwait nor Lebanon have States/Provinces.
2016-12-15 16:34:43 -05:00
Claudio Sanches
0da2f70e13
Fixed coding standards
2016-12-15 15:11:08 -02:00
Claudio Sanches
485c89ee99
Fixed wrong textdomain
2016-12-15 14:44:43 -02:00
Mike Jolley
d52a126eb2
Remove bulk_action callback
2016-12-15 15:55:40 +00:00
Mike Jolley
61605e893b
Remove legacy code and add correct callback
...
#12476
2016-12-15 15:51:54 +00:00
Claudio Sanches
e5290fef79
Merge pull request #12604 from woocommerce/fix-12509
...
[2.6] [REST API] Throw exception when product image ID is not a valid attachment
2016-12-15 13:43:56 -02:00
Mike Jolley
cbc18258e6
Cast found posts to int
...
Fixes #12608
2016-12-15 15:24:35 +00:00
Mike Jolley
dcc47e395f
Add email for case #12603
...
Closes #12603
2016-12-15 15:21:53 +00:00
Mike Jolley
53436d2043
No need to update totals
...
#12237
2016-12-15 15:07:48 +00:00
Mike Jolley
cf0943fda9
Fix term sorting
...
Closes #12602
2016-12-15 14:09:01 +00:00
Mike Jolley
3c06dab0e8
Change action order to be compat with 2.6
...
Closes #12606
2016-12-15 13:08:25 +00:00
Mike Jolley
ad4704f02d
Variations script refactor from #12585
...
Applying this to master to match 2.6 PR
2016-12-15 12:58:41 +00:00
Mike Jolley
e1ec8fb9db
Merge pull request #12598 from woocommerce/percent-coupon-types
...
Merging percent based coupon types
2016-12-15 11:09:54 +00:00
Claudio Sanches
af52cf4f73
[2.6] [REST API] Throw exception when product image ID is not a valid attachment
2016-12-14 21:11:50 -02:00
Claudio Sanches
91d8230c5d
Merge pull request #12599 from woocommerce/bulk-labels
...
More explicit bulk price labels
2016-12-14 18:17:09 -02:00
Claudio Sanches
9d8b45087f
Merge pull request #12577 from woocommerce/checkout-locale-simplification
...
Add sort parameter to checkout fields to aid with sorting per locale.
2016-12-14 17:34:15 -02:00
Mike Jolley
66be50ba72
More explicit bulk price labels
2016-12-14 12:06:46 +00:00
Mike Jolley
7873a328ce
Rewrite should be false
...
Closes #12589
2016-12-14 11:28:26 +00:00
Mike Jolley
7806ac4edf
Missing data store
...
Fixes #12588
2016-12-14 11:26:21 +00:00
Mike Jolley
3e2a758c65
Fix meta data read
2016-12-14 11:23:17 +00:00
Mike Jolley
18920bd55e
Remove validate_cart_excluded_sale_items
2016-12-14 11:17:22 +00:00
Mike Jolley
b5f9d6b6eb
Merge percent and cart percent coupon types
2016-12-14 11:07:08 +00:00
Mike Jolley
f29288b542
Fix default attribute saving
2016-12-13 20:03:00 +00:00
Mike Jolley
b5da116ed9
Fix check in dad7dcbf4b
2016-12-13 18:54:06 +00:00
Mike Jolley
d32797b733
Handle BW compat priority.
2016-12-13 18:48:39 +00:00
Claudio Sanches
a9f8ccd77c
Merge pull request #12583 from woocommerce/cli-updates
...
Update CLI callback
2016-12-13 14:18:34 -02:00
Mike Jolley
95794b720c
Only set date_created if empty
...
Fixes #12579
2016-12-13 14:22:59 +00:00
Mike Jolley
d441e34ef5
Support template option
...
Closes #12544
2016-12-13 14:02:52 +00:00
Mike Jolley
9651a1d3fc
Update CLI callback
2016-12-13 13:38:20 +00:00
Mike Jolley
dad7dcbf4b
Check IPV6 support and add log
...
Closes #12580
2016-12-13 12:35:25 +00:00
Mike Jolley
6cf565c122
IDs for products were stored as strings in legacy
2016-12-12 15:29:53 +00:00
Mike Jolley
74f3972e26
Add sort parameter to checkout fields to aid with sorting per locale.
2016-12-12 15:23:28 +00:00
Mike Jolley
1e80db6021
Force meta to be written on creation
...
#12567
2016-12-12 13:56:35 +00:00
Mike Jolley
ecbf72632d
Unused code
2016-12-12 13:43:39 +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
4d2364573c
Fix query spaces
2016-12-12 13:10:29 +00:00
Mike Jolley
0e72b87ca1
Allow comment editing.
...
Closes #12563
2016-12-12 13:00:08 +00:00
Mike Jolley
dcb5211adf
Clear woocommerce_plugin_background_installer event
2016-12-12 12:02:06 +00:00
Mike Jolley
306c4f8a2d
Merge pull request #12569 from webmandesign/patch-2
...
Fixing issue #12568
2016-12-12 11:20:16 +00:00
Mike Jolley
b463bcc4a0
Fix deprecated filter mapping
2016-12-12 10:58:27 +00:00
Oliver Juhas
6b5330e16e
Checking if we got the attachment post
...
Fixing issue #12568
2016-12-10 20:45:04 +01:00
Mike Jolley
df057abe88
Missing DISTINCT keyword
2016-12-10 12:51:15 +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
40ab84b372
Merge pull request #12552 from woocommerce/cli
...
WooCommerce CLI
2016-12-09 17:12:51 +00:00
Mike Jolley
8bd08e4c21
typos
2016-12-09 17:04:44 +00:00
Mike Jolley
36f7c3c810
woocommerce_paypal_line_item filter
...
Closes #12554
2016-12-09 16:59:29 +00:00
Mike Jolley
87579c013d
Fix attribute output
...
Closes #12556
2016-12-09 16:43:22 +00:00
Mike Jolley
240c599b9c
Base transient name on query args
...
Fixes #12557
2016-12-09 16:27:54 +00:00
Mike Jolley
0ac6c3b03f
Use IDs to reduce queries
2016-12-09 15:54:58 +00:00
Mike Jolley
e0e0c9e832
Replace rating filters with taxonomy
2016-12-09 15:43:25 +00:00
Mike Jolley
861f9e7a20
update_object_term_cache for cart items
2016-12-09 13:16:15 +00:00
Mike Jolley
5df70d8458
Merge pull request #12546 from woocommerce/paypal-image-url
...
Add image_url setting to PayPal Standard.
2016-12-09 12:59:59 +00:00
Mike Jolley
5562cfc1f6
Lazy load product meta data
2016-12-09 12:18:21 +00:00
Justin Shreve
ec30c308c3
Add CLI tests
2016-12-08 14:13:10 -08:00
Justin Shreve
da1e14c087
Add WC CLI commands powered by the REST API.
2016-12-08 10:59:07 -08: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
90ff6705be
Only validate attachment IDs when set after read
2016-12-08 16:08:10 +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
edfc54dff5
Add image_url setting to PayPal Standard.
2016-12-08 12:28:05 +00:00
Mike Jolley
43d018bb97
Attributes are non-hierarchical by default (parent is not supported)
...
Closes #12530
2016-12-08 11:23:24 +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
Mike Jolley
af3f735664
Merge pull request #12543 from woocommerce/tax-zip
...
Fix tax name typo and wrap with _escape.
2016-12-07 21:03:40 +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
Justin Shreve
a315e174b7
Fix tax name typo and wrap with _escape.
2016-12-07 11:03:28 -08:00
Mike Jolley
5139c811d6
Merge pull request #12533 from woocommerce/rest-api-4.7
...
[2.6] API Fixes for 4.7
2016-12-07 18:51:47 +00:00
Mike Jolley
07932b4432
Merge pull request #12535 from woocommerce/fallbacks-for-endpoints
...
Fix lost password and account links
2016-12-07 18:18:40 +00:00
Mike Jolley
e8d119c42c
Feedback
2016-12-07 18:13:17 +00:00
Mike Jolley
a2263d2760
Type should be checked by name not slug
2016-12-07 18:08:59 +00:00
Mike Jolley
1ad852443b
Invalid type
2016-12-07 15:54:35 +00:00
Mike Jolley
7f234a0b63
Update array schema
2016-12-07 14:24:44 +00:00
Mike Jolley
cce08e6225
Indenting
2016-12-07 14:06:04 +00:00
Mike Jolley
9f85aa3869
Merge pull request #12489 from woocommerce/add/twenty-seventeen-support-new-method
...
Add/twenty seventeen support new method
2016-12-07 12:46:36 +00:00
Mike Jolley
6d908cfba2
Code cleanup and move class into subdirectory
2016-12-07 12:45:54 +00:00
Mike Jolley
d4fbda1d68
Put back array for arrays of objects
2016-12-07 12:20:56 +00:00
Mike Jolley
9a9d133fc3
Use correct endpoint for lost password link
2016-12-07 12:07:10 +00:00
Mike Jolley
fe9e89f3b7
wc_logout_url function
2016-12-07 12:04:44 +00:00
Mike Jolley
d9420e01d2
Fix themes_api fatal error
2016-12-07 11:37:00 +00:00
Mike Jolley
ba62599da0
Use objects, rather than arrays in schema when properties are defined
2016-12-07 11:36:46 +00:00
Mike Jolley
7583965af2
Use wp_list_sort vs _usort_terms_by_ID
...
Fixes #12525
2016-12-07 10:21:03 +00:00
Mike Jolley
3f1368153a
Merge pull request #12521 from woocommerce/plugins-url-assets-12477
...
Register scripts using plugins_url
2016-12-06 16:04:30 +00:00
James Koster
4daa5d133b
Add a utility function to check the active theme.
...
And check active theme before loading integration class
2016-12-06 12:14:00 +00:00
Mike Jolley
cb3b9fb02a
Merge branch 'pr/12510'
2016-12-06 11:52:23 +00:00
Mike Jolley
201f89b19a
Clean up template loader logic
2016-12-06 11:52:15 +00:00
Mike Jolley
ff05080208
Merge pull request #12462 from danielhuesken/fix_rest_setting_user_role
...
Set customer role for user if it not a customer on the current blog
2016-12-06 11:16:27 +00:00
Mike Jolley
070926f7e6
woocommerce_downloadable_file_hash filter
...
Closes #12444
2016-12-06 11:09:03 +00:00
Mike Jolley
7b739b9367
Register scripts using plugins_url
2016-12-05 18:34:30 +00:00
Mike Jolley
4bd05c7396
Combine 2 address loops
2016-12-05 16:08:51 +00:00
Mike Jolley
162aa986b6
Fix tests
2016-12-05 14:21:09 +00:00
Mike Jolley
4130ae0e1f
Merge pull request #12520 from woocommerce/feedback-12495
...
2.7 CRUD Feedback
2016-12-05 13:47:58 +00:00
Mike Jolley
ad7d8c14dc
Do not suffix when ranges are used.
2016-12-05 13:44:21 +00:00
Mike Jolley
1f04cf9dc0
Comment on has_all_attributes_set
2016-12-05 13:15:25 +00:00
Mike Jolley
2780688a70
wc_get_price_html_from_text
2016-12-05 13:13:30 +00:00
Mike Jolley
3975054acd
Reindex after clear.
2016-12-05 13:06:14 +00:00
Kalen Johnson
2d7e6e7206
Filter the template loader files
...
Over at Roots we've been working on implementing Laravel's Blade templating engine with the next release of the Sage theme. The filters for the template hierarchy coming in WP 4.7 are going to be very valuable. Looking to accomplish the same thing with 3rd party plugins as well.
A theme using a templating engine would still be able to filter the default templates such as `archive-product.php`, however keeping the functionality that including a `woocommerce.php` file would be nice to be able to use as well.
This PR I believe adds the ability to add a file similar to `woocommerce.php` while not allowing anyone to filter any of the extra functionality away from Woocommerce.
2016-12-03 10:16:18 -08:00
Mike Jolley
ba56274662
Move get_price_suffix back to main class
2016-12-02 17:02:06 +00:00
Mike Jolley
d67f17a789
Put get_availability functions back in main product classes.
2016-12-02 16:46:35 +00:00
Mike Jolley
6a50228cda
Merge pull request #12472 from woocommerce/refactor-checkout-class
...
Checkout Refactoring
2016-12-02 16:16:18 +00:00
Mike Jolley
3bf3422b5c
Feedback
2016-12-02 16:13:36 +00:00
Justin Shreve
877c4c52ce
Merge pull request #12499 from woocommerce/fix/catalog-visibility
...
Set featured status and catalog visibility when saving products.
2016-12-01 17:26:16 -08:00
Mike Jolley
a8f6fd88f4
Merge pull request #12488 from woocommerce/save-coupon-wp-error
...
When saving coupons, return wp_error if necessary
2016-12-01 16:21:23 +00:00
Justin Shreve
b5e9fc08fe
Set featured status and catalog visibility when saving products.
2016-11-30 10:20:18 -08:00
agrillo
328401271f
Fixed: if woocommerce_resend_order_emails_available hook return an empty array the optgroup label "Resend order emails" It is also printed
2016-11-30 11:32:38 +01:00
Justin Shreve
a94acad387
Fix title, enabled, and description updates for payment gateways. Add missing readonly on method title and description.
...
Bump WC version.
2016-11-29 11:57:56 -08:00
Justin Shreve
5d8ce22afe
When saving coupons, return wp_errors if an item cannot be created or updated.
2016-11-29 03:06:10 -08: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
James Koster
fee04b821c
add sidebar #12038
2016-11-28 12:11:19 +00: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
Manos Psychogyiopoulos
b10810824f
add 'id' to WC_Abstract_Legacy_Product __isset
2016-11-27 16:30:13 +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
James Koster
70cee3d1ad
some basic shop page styling. #12038
2016-11-25 16:10:58 +00:00
James Koster
18349ddea1
Adds twenty seventeen stylesheet. #12038
2016-11-25 15:25:37 +00:00
James Koster
20507f0944
Adds a new class for 2017 integration, removes core wrappers, adds .scss file. #12038
2016-11-25 15:17:13 +00:00
Mike Jolley
169c70f447
Fix get_stock_amount
2016-11-25 14:48:20 +00:00
Mike Jolley
086d8bce1d
Fix is_callable
2016-11-25 14:48:20 +00:00
Mike Jolley
fb2804a5ab
Code comments
2016-11-25 14:48:20 +00:00
Claudio Sanches
2e76eff151
Merge pull request #12466 from woocommerce/fix/webhook-resource-delete
...
[2.6] Fixed when should deliver wp_trash_post
2016-11-25 12:03:11 -02:00
Matty
ff1442e9aa
Allow cross sells to be sold as variations
2016-11-25 13:17:09 +00:00
Mike Jolley
e3f19f85c6
Add readonly role field to API
...
Closes #12468 @claudiosanches
2016-11-25 13:04:21 +00:00
Mike Jolley
3610866bf9
Link variations to parent product page
2016-11-25 12:48:54 +00:00
Mike Jolley
52be22511c
Inline docs for #12409
2016-11-25 12:24:26 +00:00
James Koster
7f15372919
declare support and add wrappers. #12038
2016-11-25 11:57:42 +00:00
Mike Jolley
afe59f697d
Merge pull request #12441 from opportus/layered-nav-menu-dropdown-empty-count-fix
...
Layered Nav menu dropdown empty count fix
2016-11-25 11:47:44 +00:00
Mike Jolley
b620a8c8fb
Move paypal CMD to end of post vars.
2016-11-25 11:41:49 +00:00
Mike Jolley
eab41b37f7
Move location of billing email field to work with password managers.
...
Fixes #11016
2016-11-25 11:32:42 +00:00
Mike Jolley
f67ffe4d89
Merge pull request #12465 from woocommerce/crud-ajax-class
...
AJAX Class and other fixes
2016-11-25 10:44:20 +00:00
Mike Jolley
1a632cda1f
Missing space and incorrect comment
2016-11-25 10:43:56 +00:00
Mike Jolley
8d30e1d044
Correct title filter
2016-11-25 10:41:42 +00:00
Claudio Sanches
461e2486d2
[2.6] Fixed when should deliver wp_trash_post
2016-11-24 16:07:32 -02:00
Mike Jolley
9a1dd8d04b
Menu order
2016-11-24 17:50:24 +00:00
Claudio Sanches
1ed2f9d136
Fixed undefined index while saving coupons on admin screen
2016-11-24 15:43:01 -02:00
Mike Jolley
1749551021
Customer crud
2016-11-24 15:31:05 +00:00
Mike Jolley
12a216595a
CRUD ajax updates
2016-11-24 14:20:58 +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
6b8fc659bf
Put get_title back in main class
2016-11-24 14:19:52 +00:00
Daniel Hüsken
89026327b8
Set customer role for user if it not a customer on the current blog
2016-11-24 13:52:54 +01:00
Mike Jolley
ac62cffe16
Refactor ajax search for CRUD
2016-11-24 11:50:58 +00:00
Mike Jolley
b1e538c096
Make factory check type
2016-11-24 11:50:46 +00:00
Mike Jolley
b9bb8eabba
Fix order item meta
2016-11-24 11:50:34 +00:00
Mike Jolley
a0f08bb627
Merge pull request #12460 from davidlawson/master
...
Fixing incorrect prices around tax
2016-11-24 10:24:53 +00:00
Mike Jolley
badd63bdd9
Merge pull request #12448 from woocommerce/webhook-api-versions
...
Allow send webhook payload using legacy API v3 or WP REST API integration
2016-11-24 10:22:01 +00:00
Mike Jolley
f689635e4a
Merge pull request #12449 from woocommerce/update/wc-ajax-crud
...
CRUD: Add CRUD operations for ajax functions.
2016-11-24 10:21:22 +00:00
David Lawson
1d955938f2
Fixing incorrect prices around tax
...
Missing `!` when moving code from `abstract-wc-product.php`. See https://github.com/woocommerce/woocommerce/blob/release/2.6/includes/abstracts/abstract-wc-product.php#L869-L919
2016-11-24 21:19:21 +11:00
Kevin Killingsworth
0b9c2e2f15
CRUD: Add CRUD operations for ajax functions.
...
This commit changes post and post_meta calls to CRUD objects
throughout the wc-ajax server-side code.
It does not update the most complex functions that have inline SQL.
2016-11-23 15:35:48 -06: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
350ccd008c
Correct autocomplete field
...
#11016
2016-11-23 18:43:38 +00:00
Mike Jolley
b2b42600cd
Merge pull request #12454 from woocommerce/deprecation-wrappers-12328
...
Deprecation wrappers
2016-11-23 17:42:45 +00:00
Mike Jolley
6dc6e43d08
Add replacement to log entry
2016-11-23 17:41:58 +00:00
Claudio Sanches
bf598d538f
Merge pull request #12453 from woocommerce/reports-12425
...
Reports 12425
2016-11-23 15:04:44 -02:00
Mike Jolley
4ca49ba999
Fix tests
2016-11-23 16:27:18 +00:00
Mike Jolley
d7dfdd3d10
Wrap all deprecation calls.
2016-11-23 16:15:00 +00:00
Mike Jolley
87de7aab6f
Remove unused variation CRUD methods.
2016-11-23 15:59:39 +00:00
Mike Jolley
c8d1acb33e
Prevent tags breaking page layout
2016-11-23 15:49:35 +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
Mike Jolley
2b1c762142
Set parent
2016-11-23 15:37:34 +00:00
Mike Jolley
f2ea71ea6f
Reports fixes
2016-11-23 15:36:52 +00:00
Mike Jolley
dcf39fc8cd
Fix order item meta saving
2016-11-23 15:10:18 +00:00
Claudio Sanches
bdb863cef1
Fixed method return value in write context
2016-11-23 12:41:40 -02:00
Mike Jolley
7ad640b567
Update parent meta too for refunds
2016-11-23 13:18:49 +00:00
Mike Jolley
d5f1472e75
Set parent
2016-11-23 13:11:51 +00:00
Claudio Sanches
8d19832937
Fixed coding standards
2016-11-22 23:47:13 -02:00
Claudio Sanches
92ad1b43b2
Updated webhook admin options
2016-11-22 23:08:22 -02:00
Claudio Sanches
5a0c815623
Allow set data using legacy API v3 and WP API integration in webhooks
2016-11-22 22:59:55 -02:00
Claudio Sanches
5d1c074998
Fixed headers response data
2016-11-22 22:48:31 -02:00
Claudio Sanches
a98c4b429f
Fixed broke webhooks pagination label
2016-11-22 22:48:00 -02:00
Claudio Sanches
7aafd6cce7
Set webhook API version in REST API
2016-11-22 22:01:16 -02:00
Claudio Sanches
4d85905c0b
Allow set webhook api version on admin
2016-11-22 21:58:36 -02:00
Claudio Sanches
30f1d0bf66
Allow set api version
2016-11-22 21:49:04 -02:00