Commit Graph

19320 Commits

Author SHA1 Message Date
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
Claudiu Lodromanean f376684732 Make 2-column checkout form inputs flip on RTL 2017-02-06 09:59:31 -08: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
Mike Jolley 8a0761fdf5 Merge pull request #13057 from thenbrent/fix_undefined_index
Fix undefined index notice in WC_Webhook:: should_deliver()
2017-02-03 10:59:36 +01:00
Claudiu Lodromanean b237e06dd4 Get tiptips working correctly in RTL mode 2017-02-03 10:41:31 +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 1fe705547f Fixed REST API batch tests 2017-02-02 19:20:07 +01: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 1d076cbec5 Trigger for emails 2017-02-01 20:08:51 +01: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
Claudiu Lodromanean c220f38ba8 12170 Style tweaks for email "From" address input to improve RTL compatibility 2017-02-01 18:41:14 +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
Claudio Sanches 73603ac3cc Merge pull request #13037 from thenbrent/add_wc_order_get_valid_statuses
Add WC_Abstract_Order::get_valid_statuses()
2017-02-01 09:53:36 +01:00
Claudio Sanches ad4c2d73f4 Merge pull request #13041 from woocommerce/fix-13014
Update Zoom to 1.7.18
2017-02-01 09:48:15 +01:00
Caleb Burks 4e59f08918 Update Zoom to 1.7.18 2017-01-31 22:47:25 -06: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