Commit Graph

9905 Commits

Author SHA1 Message Date
Mike Jolley e07d9ad970 Actions and filters
Adds actions when duplicating things so objects can be changed, and
reinstates woocommerce_duplicate_product_exclude_meta which can unset
meta keys before save.

Closes #13180
2017-02-15 15:35:59 +00:00
Mike Jolley 2f685691a4 Standardise update meta calls, and support forcing
Force allows create to make sure data is set regardless of whether it
was changed. This fixes product duplication.

Fixes #13199
2017-02-15 14:40:57 +00:00
Claudio Sanches 7baaeaafd0 Public WC()->query->get_endpoints_mask() #13179 2017-02-15 12:30:23 -02:00
Claudio Sanches bad93d4c86 Improved naming for meta_data in schema 2017-02-15 12:28:45 -02:00
Claudio Sanches 185b1929e2 Merge pull request #13179 from helgatheviking/filter_query_vars
add woocommerce_get_query_vars filter
2017-02-15 12:28:01 -02:00
Mike Jolley 1dfdecf9b7 Merge pull request #13198 from woocommerce/fix/notice-on-saving-order
Fix PHP notice when there are shipping taxes.
2017-02-15 14:20:39 +00:00
Boro Sitnikovski 5dd607023b Fix PHP notice when there are shipping taxes. 2017-02-15 15:17:04 +01:00
Mike Jolley 019b2515b8 Merge pull request #13151 from thenbrent/reusable_checkout_line_item_creation
Make WC_Checkout line item creation methods reusable by 3rd party code
2017-02-15 13:11:41 +00:00
Mike Jolley adb718b71e Missing include 2017-02-15 11:45:07 +00:00
Mike Jolley f4ab01d276 Reduce index sizes based on data 2017-02-15 11:36:41 +00:00
Mike Jolley 5f20f9a1f1 Fix tax rate country index 2017-02-15 11:17:33 +00:00
Claudio Sanches 9012fead56 Merge pull request #13136 from woocommerce/improvement-12990
Add logic to variation title generation and remove redundant template info.
2017-02-14 19:15:48 -02:00
Claudiu Lodromanean 44af1237e5 Move things around for performance 2017-02-14 13:11:45 -08:00
Mike Jolley e8628ab412 Merge pull request #13188 from Chouby/master
[2.7] Add filter woocommerce_duplicate_product_exclude_children back
2017-02-14 19:39:17 +00:00
Mike Jolley 0c7218047c Fix error message 2017-02-14 19:31:14 +00:00
Mike Jolley e0d1cfc7b0 Actions 2017-02-14 19:23:57 +00:00
Claudiu Lodromanean 749971759f Reduce spacing back to original 2017-02-14 11:22:50 -08:00
Claudiu Lodromanean 332e79da8d Re-approach attribute skipping in simpler, general purpose way 2017-02-14 11:20:20 -08:00
Mike Jolley 17e8ea8236 Filter hooks 2017-02-14 18:57:45 +00:00
Mike Jolley 7b0b1529bf woocommerce_checkout_order_processed bw compat 2017-02-14 18:57:29 +00:00
Mike Jolley 6add2f9a64 WC_Deprecated_Hooks abstract 2017-02-14 18:56:09 +00:00
Mike Jolley 1a61f20785 Add actions to trigger legacy actions 2017-02-14 18:55:56 +00:00
Mike Jolley c53d0cc89c Correctly deprecate all methods and move action/filter code 2017-02-14 18:55:30 +00:00
Manos Psychogyiopoulos 821b360ac1 remove stray error_log 2017-02-14 18:26:40 +02:00
Manos Psychogyiopoulos 1895f65d2d allow update_post_meta and handle_updated_props to be overriden 2017-02-14 18:14:37 +02:00
Claudio Sanches 0dac5e596c Included meeta data to products 2017-02-14 14:01:31 -02:00
Claudio Sanches ad3716a49e Fixed coupons schema 2017-02-14 13:59:22 -02:00
Frédéric Demarle f502e306e6 Add filter woocommerce_duplicate_product_exclude_children back 2017-02-14 16:39:49 +01:00
Akeda Bagus 840a4b18a6
Fix wrong meta key in recorded_coupon_usage_counts getter/setter.
Fixes #13183.
Fixes #13182.
2017-02-14 17:33:32 +07:00
Claudiu Lodromanean 3068d56bac Remove unused variable 2017-02-13 14:19:26 -08:00
Claudiu Lodromanean ab1b3201e0 Update docblock 2017-02-13 13:54:52 -08:00
Claudiu Lodromanean afcbd456c4 Skip attributes in get_formatted_meta_data a different way 2017-02-13 13:53:22 -08:00
Claudio Sanches 5365fec1b3 V1 and V2 for products endpoint 2017-02-13 19:44:27 -02:00
Claudiu Lodromanean a8b491b55b Handle product titles with no attributes 2017-02-13 11:45:25 -08:00
Kathy Darling f29c51497e add woocommerce_get_query_vars filter 2017-02-13 12:22:05 -06:00
Mike Jolley 00cda91c73 Merge pull request #13164 from woocommerce/lazy-update-products-13157
Lazy update products
2017-02-13 17:24:51 +00:00
Mike Jolley ad442567d6 Remove isset rule 2017-02-13 14:39:00 +00:00
Mike Jolley bdf567e90d Adjust how product_type is deprecated 2017-02-13 14:31:43 +00:00
Mike Jolley 3157955414 Adjustments to schema
#13161
2017-02-13 14:04:33 +00:00
Mike Jolley d080e135ee Reduce `select *` usage 2017-02-13 12:58:42 +00:00
Jez McKean b65e41206f needs_shipping(): minor efficiency improvement
No need to check other products for whether they need shipping if we've already found one.
2017-02-13 12:28:50 +00:00
Mike Jolley cfa3c34ada bigint(20) replacement
Closes #13160
2017-02-13 11:49:30 +00:00
Mike Jolley f7da2c615a Remove location_type index
Closes #13162
2017-02-13 11:47:27 +00:00
Mike Jolley 8d13913e70 Avoid division by 0 in wc_get_loop_class
Closes #13159
2017-02-13 11:25:58 +00:00
Claudio Sanches 633ed64b02 Merge pull request #13156 from woocommerce/fix-12802
Improve checkout performance when updating product sales
2017-02-11 13:53:32 -02:00
Mike Jolley a20c0da580 syntax error 2017-02-11 15:50:21 +00:00
Mike Jolley 6cf98a7e4d Avoid read after updating meta in the database
@justinshreve Was there a reason this was added? I don’t see a reason
why it needs to be re-read if the array is up to date?
2017-02-11 15:45:13 +00:00
Mike Jolley ca1d49b2b6 Conditional visibility and downloads 2017-02-11 15:35:20 +00:00
Mike Jolley 91ac4a2e56 Remove update_term_counts
This does not look to be necessary because we use wp_set_post_terms
which handles this for us. Seems to be inherited from legacy.
2017-02-11 15:27:52 +00:00
Mike Jolley 8494bf7bee Conditonal post data saving 2017-02-11 15:26:13 +00:00
Claudio Sanches d02d90c867 V1 and V2 for product taxonomies, reviews, reports, taxes and webhooks 2017-02-11 12:51:41 -02:00
Claudio Sanches e9f2e75d53 Fixed coding standards and file header 2017-02-11 12:51:13 -02:00
Claudio Sanches 1b1b784cb4 Merge pull request #13158 from woocommerce/fix-13119
Only append tax price suffix if taxable
2017-02-11 12:08:11 -02:00
Mike Jolley eb518ec06d Only append tax price suffix if taxable 2017-02-11 00:08:49 +00:00
Mike Jolley 979e64c242 Merge pull request #13145 from woocommerce/fix/cli-id-docs
Fix CLI documentation for commands with multiple IDs.
2017-02-11 00:05:17 +00:00
Mike Jolley 31d428131e Imrpove checkout performance when updating product sales 2017-02-10 23:41:53 +00:00
Claudio Sanches 190ebccd00 Fixed order notes 2017-02-10 21:34:01 -02:00
Claudio Sanches 7f82051dd9 Fixed returning values in write context 2017-02-10 21:32:40 -02:00
Claudio Sanches ca67d448a2 Fixed doing it wrong notices 2017-02-10 21:11:56 -02:00
Claudiu Lodromanean 8a05f72f78 Minor clean-up 2017-02-10 14:35:26 -08:00
Claudiu Lodromanean f362e0108e Enable attribute suppression in wc_display_item_meta 2017-02-10 14:11:16 -08:00
Claudio Sanches e84acf3ee4 Order notes v2 2017-02-10 18:31:29 -02:00
Claudio Sanches e4b6c81f66 Customer downloads v2 2017-02-10 18:31:21 -02:00
Brent Shepherd 5d10c797d0 Make WC_Checkout line item creations reusable
By passing in dependencies, like cart items, fees, taxes or coupons,
as well as the cart to which they relate.
2017-02-10 12:03:32 -08:00
Claudiu Lodromanean 8d2fd29396 Don't rtlcss select2.css 2017-02-10 11:39:28 -08:00
Mike Jolley d693863ad2 Merge pull request #13064 from thenbrent/variable_product_sync_filters
Modify variable product sync hooks
2017-02-10 18:40:48 +00:00
Brent Shepherd 5d560f380a Remove 'woocommerce_variable_product_synced' hook
And add additional suggested alternatives to the deprecated
woocommerce_variable_product_sync hook.
2017-02-10 10:36:35 -08:00
Brent Shepherd 5dec55928b Add 'woocommerce_variable_product_sync_data'
Renaming 'woocommerce_variable_product_sync_before_save'
2017-02-10 10:33:48 -08:00
Claudiu Lodromanean b6b3f0c217 Modify product title logic 2017-02-10 10:19:05 -08:00
Mike Jolley 82d9abd4c5 Make sure enabled is checked by default
#13147
2017-02-10 17:43:32 +00:00
Claudio Sanches b1b536b5d2 Give REST API authentication a lower priority
Bigger than add_filter( 'determine_current_user', 'wp_validate_auth_cookie' );
Smaller than add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20
);

This solve issues while trying to authenticate in a browser while logged
in.

Closes #13134
2017-02-10 15:35:52 -02:00
Justin Shreve 700026c2ab Separate positional and assoc arguments. 2017-02-10 08:38:43 -08:00
Mike Jolley b58e26b0ab Backwards compatibility for triggers
Closes #13141
2017-02-10 13:09:37 +00:00
Mike Jolley 5349171083 This panel does not show in products anyway
Fixes #13133
2017-02-10 12:51:49 +00:00
Claudiu Lodromanean ab8fb48bb4 Fix and standardize e-mail sending 2017-02-09 14:49:39 -08:00
Claudiu Lodromanean 21617f408d Bring up to date with master 2017-02-09 14:06:49 -08:00
Claudiu Lodromanean e330ab4158 Pass product into filters 2017-02-09 14:05:40 -08:00
Claudiu Lodromanean a3f9207839 Add logic to variation title generation 2017-02-09 14:03:00 -08:00
Claudio Sanches ec8fe6e30d [REST API] Implement CRUD to customers 2017-02-09 19:54:16 -02:00
Claudio Sanches 23fbc31dfb [REST API v1] Implement CRUD to coupons 2017-02-09 19:22:19 -02:00
Claudio Sanches 5d87a28407 Restored shipping zones base controller 2017-02-09 18:46:57 -02:00
Claudio Sanches 88d2875514 Restored REST API v1 2017-02-09 18:40:35 -02:00
Claudio Sanches 4b156ab1ae Merge old REST API branch 2017-02-09 18:19:56 -02:00
Claudio Sanches feeb98e801 Merge pull request #13131 from woocommerce/cli-attrib
Restructure ID route code for the CLI & fix attribute term.
2017-02-09 18:14:19 -02:00
Justin Shreve 309d118287 Restructure ID route code for the CLI & make the attribute term command work. 2017-02-09 10:29:24 -08:00
Claudiu Lodromanean 3120a19dae Switch isset back to array_key_exists to keep null-default props working 2017-02-09 10:13:44 -08:00
Justin Shreve 988175b746 Merge pull request #13127 from woocommerce/fix/product-data-store-title
Don't use get_the_title during product read
2017-02-09 10:08:51 -08:00
Claudio Sanches c350ecfb99 Fixed PHP 5.2 fatal error, closes #13128 2017-02-09 15:27:26 -02:00
Claudio Sanches 4352484ed7 REST API v2 2017-02-09 15:06:13 -02:00
Justin Shreve 8a6bae374f Switch from get_the_title to the post objects post_title. 2017-02-09 08:43:48 -08:00
Mike Jolley 962b60c8fe kses/sanitize 2017-02-09 15:43:47 +00:00
Claudio Sanches 2c5f032b0b Merge pull request #13099 from woocommerce/fix-13011
If woocommerce_adjust_non_base_location_prices is false, remove modded tax, not base tax
2017-02-09 13:41:06 -02:00
Claudio Sanches 094b86c92b Merge pull request #13104 from woocommerce/fix-13015
Inherit shipping class id from parent
2017-02-09 13:37:54 -02:00
Claudio Sanches e3b563c518 Merge pull request #13044 from woocommerce/crud-perf-tweaks
[2.7] CRUD performance improvements for emails
2017-02-09 13:25:29 -02:00
Mike Jolley dcce2a4190 Change order of execution on checkout so shipping is required.
Closes #12992
2017-02-09 12:59:13 +00:00
Mike Jolley 234b4cfa91 Merge pull request #13009 from woocommerce/gallery-tweaks
Gallery tweaks
2017-02-09 12:34:23 +00:00
Mike Jolley d7e9af3ac8 Use current_theme_supports 2017-02-09 12:34:06 +00:00
Mike Jolley 7ff301e2ca Merge branch 'master' into crud-perf-tweaks
# Conflicts:
#	includes/data-stores/class-wc-order-item-data-store.php
2017-02-09 12:31:25 +00:00
Mike Jolley 16afdeec96 Add prefix 2017-02-09 12:30:33 +00:00
Mike Jolley 1c10ad94cb Remove order item column due to performance issues on orders screen 2017-02-09 12:29:16 +00:00