Commit Graph

10690 Commits

Author SHA1 Message Date
Mike Jolley 0348a4751e Use placeholder value from backend if not set 2017-04-06 18:19:07 +01:00
Mike Jolley fd3e656912 Pull tax status from parent since there is no UI to set at variation level 2017-04-06 17:54:34 +01:00
Mike Jolley 56eb3c4da3 Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty 2017-04-06 17:50:04 +01:00
Claudio Sanches 4032167f6c Removed extra variation description extra sanitization 2017-04-06 13:21:34 -03:00
Claudio Sanches fc9ba64e50 Properly format variation description in REST API v2 2017-04-06 13:02:51 -03:00
Claudio Sanches f3c2e6c5f6 Improved wc_format_content() formatting and added sanitization 2017-04-06 13:01:35 -03:00
Claudio Sanches 567a551d83 Fixed shortcode render for variations and backwards compatibility
Fixes #13949
2017-04-06 13:00:02 -03:00
Claudio Sanches b059851882 Merge pull request #14001 from woocommerce/fix/13980
Allow search customers by ID in admin customer ajax search
2017-04-06 12:01:39 -03:00
Claudio Sanches 3fff61ea4e Merge pull request #14043 from woocommerce/fix/missing-product-type-field
if product type field is not posted, we should maintain existing type, not change to simple
2017-04-06 11:58:55 -03:00
Mike Jolley 82cdf65c04 if product type field is not posted, we should maintain existing type, not change to simple 2017-04-06 15:56:55 +01:00
Manos Psychogyiopoulos e18d9741a4 Fix non-existing stdClass props 2017-04-06 17:42:51 +03:00
Claudio Sanches f3156fb5f4 Merge pull request #13981 from woocommerce/fix/13936
[REST API] Fixed attributes while trying to save variations
2017-04-06 11:38:23 -03:00
Claudio Sanches 83135c24c1 Merge pull request #13971 from woocommerce/fix/13966
Ensure gateways are loaded in emails
2017-04-06 11:38:09 -03:00
Claudio Sanches 966fd0e411 Merge pull request #14037 from woocommerce/fix/legacy-sync
Only call sync if callable
2017-04-06 10:54:58 -03:00
Claudio Sanches 6c1a38d637 Merge pull request #13975 from woocommerce/fix/13943
Compare to the order item title instead of variation title
2017-04-06 10:36:36 -03:00
Claudio Sanches 550f7b4028 Merge pull request #13986 from woocommerce/fix/13954
Fixed "singular" and "plural" parameters of WP_List_Table instances
2017-04-06 10:33:43 -03:00
Claudio Sanches 9a219b71da Merge pull request #14036 from woocommerce/fix/14032
Make sure we have a prefix for strstr
2017-04-06 10:25:46 -03:00
Mike Jolley 261ae0ebda Only call sync if callable 2017-04-06 14:18:17 +01:00
Claudio Sanches 03004bdd49 Merge pull request #14009 from woocommerce/fix/14006
When forcing shipping to billing, set the shipping fields in the order itself
2017-04-06 10:17:54 -03:00
Claudio Sanches 01c425398c Merge pull request #14012 from woocommerce/fix/13930-alt
Hide structured data in hidden element
2017-04-06 10:14:30 -03:00
Claudio Sanches f2b90d6163 Merge pull request #14014 from woocommerce/fix/13906
Set session data only if the value is empty in customer object. Prevents session data overwriting customer data on login.
2017-04-06 10:12:54 -03:00
Claudio Sanches 03e05cab1c Merge pull request #14017 from woocommerce/fix/14008
Allow variation image to be unset
2017-04-06 10:12:12 -03:00
Mike Jolley 822412d03c Make sure we have a prefix for strstr
Closes #14032
2017-04-06 14:11:00 +01:00
Claudio Sanches ddf188a61e Merge pull request #14018 from woocommerce/fix/13968
Show a sale price on variable products if on sale and all prices are the same
2017-04-06 10:10:49 -03:00
Mike Jolley 288026ca9f Background Emailer instead of just CRON 2017-04-06 13:46:07 +01:00
Mike Jolley bf09c7df82 Ensure reg prices are the same 2017-04-06 13:08:18 +01:00
Mike Jolley 36e9b73ef3 Make sure we have a product before generating JSON 2017-04-06 12:40:53 +01:00
Mike Jolley a7a896008c Fix up the child_is_in_stock function 2017-04-06 12:26:19 +01:00
Mike Jolley 7e90a318cd On variable save, sync with children and avoid transient cache 2017-04-06 12:26:10 +01:00
Mike Jolley 47411f7397 wc_deferred_product_sync queue function 2017-04-06 12:25:54 +01:00
Mike Jolley fe42b2565c Defer variation parent sync to shutdown rather than cron 2017-04-06 12:25:34 +01:00
Mike Jolley 93689a8107 Show a sale price on variable products if on sale and all prices are the same
Fixes #13968
2017-04-06 11:01:20 +01:00
Mike Jolley eea6867ac9 Allow variation image to be unset
@claudiosanches is this correct way?

Fixes #14008
2017-04-06 10:41:09 +01:00
Mike Jolley d570a81241 Set session data only if the value is empty in customer object. Prevents session data overwriting customer data on login.
Fixes #13906
2017-04-06 10:28:32 +01:00
Mike Jolley 52939e800c Hide structured data in hidden element 2017-04-06 10:06:21 +01:00
Mike Jolley 8614a7922d When forcing shipping to billing, set the shipping fields in the order itself
Fixes #14006
2017-04-06 09:50:34 +01:00
Claudio Sanches 2ffb2e8853 Allow search customers by ID in admin customer ajax search
Closes #13980
2017-04-06 02:19:12 -03:00
Gregory Karpinsky 37c7e2a615 Docblock fix
`get_availability` returns array of strings
2017-04-06 00:32:36 -04:00
Claudio Sanches 168a4a3096 Merge pull request #13909 from woocommerce/fix/prevent-only-color-picker-to-flip
Prevent RTL flip only color picker inputs
2017-04-05 21:21:38 -03:00
Claudio Sanches 4bb2c070ae Merge pull request #13900 from woocommerce/fix/rest-api-remove-extra-taxes-params
[REST API] Removed extra taxes params.
2017-04-05 21:18:09 -03:00
Claudio Sanches 4b2481f9f2 Merge pull request #13994 from woocommerce/fix/cross-sell-columns
Cross sells were not showing first last classes since columns (2) was not being set
2017-04-05 20:33:31 -03:00
Claudio Sanches b3937bcc4d Merge pull request #13995 from woocommerce/fix/13902
Hash querystring is v not version. Stops infinite loop.
2017-04-05 20:33:00 -03:00
Mike Jolley 8333d75703 Hash querystring is v not version. Stops infinite loop.
Fixes #13902
2017-04-05 23:42:33 +01:00
Mike Jolley e16119f687 Cross sells were not showing first last classes since columns (2) was not being set 2017-04-05 23:28:13 +01:00
Mike Jolley 70778abade When setting props, exclude deprecated ones
Fixes #13928
2017-04-05 23:16:45 +01:00
Justin Shreve 15bf1da7d5 Call save_meta_data before wp_update_post for data stores that use it, and refresh meta cache after. 2017-04-05 14:39:41 -07:00
Claudio Sanches 5bcace31fc Fixed "singular" and "plural" parameters of WP_List_Table instances
Both should be slugs and not translatable.

Fixes #13954
2017-04-05 18:15:40 -03:00
Claudiu Lodromanean c02cee595e Add missing download_id param 2017-04-05 13:37:42 -07:00
Claudio Sanches 87199d0627 [REST API] Fixed attributes while trying to save variations
Closes #13936
2017-04-05 17:03:05 -03:00
Mike Jolley 359213d720 Fix direction 2017-04-05 20:25:21 +01:00
Mike Jolley 0035afc5a0 Make sure we have number > 0 so all variations are not deleted 2017-04-05 20:22:05 +01:00
Mike Jolley a6080aa4a9 Pass ID, not the product object 2017-04-05 20:21:33 +01:00
Claudiu Lodromanean 523d39578a Compare to the order item title instead of variation title 2017-04-05 12:03:18 -07:00
Claudio Sanches e2881d5af1 Ensure gateways are loaded in emails
Fix missing bank details in emails

closes #13966
2017-04-05 15:50:40 -03:00
Claudio Sanches f250cac8d1 Merge pull request #13967 from woocommerce/fix/13933
Use parent settings for determining if variations are sold individually.
2017-04-05 15:33:17 -03:00
Claudiu Lodromanean 5389844a1b Use parent data for sold_individually 2017-04-05 11:02:26 -07:00
Mike Jolley 27b35c0515 Using WPDB is quicker than wp_update_post 2017-04-05 18:40:59 +01:00
Claudio Sanches 6135aa8175 Merge pull request #13927 from woocommerce/fix/13921
Fallback to home URL if no shop page is set for system status security check.
2017-04-05 14:29:16 -03:00
Claudio Sanches 67274e8c2c Make sure that ID exists 2017-04-05 14:23:50 -03:00
Claudio Sanches 7a34e4a176 Merge pull request #13959 from woocommerce/fix/customer-set-defaults
Wrap in try catch so WC_Data_Exceptions are caught on bad email.
2017-04-05 14:20:56 -03:00
Claudio Sanches 1590ba135b Merge pull request #13961 from woocommerce/fix/system-status-hook
Add back removed filter for system status rows.
2017-04-05 14:11:40 -03:00
Claudiu Lodromanean f4a04c088b Merge pull request #13958 from woocommerce/fix/remove-legacy-clear
Removed extra clear parameter from addresses
2017-04-05 09:41:08 -07:00
Claudiu Lodromanean 87b71b0653 Merge pull request #13941 from woocommerce/fix/hook-deprecated-function-calls
Use wc_deprecated_function so notices are not triggered on ajax requests
2017-04-05 09:36:01 -07:00
Claudiu Lodromanean 691441f87f Merge pull request #13935 from woocommerce/fix/13920
wc_get_object_terms should check it's not an error object
2017-04-05 09:30:02 -07:00
Claudiu Lodromanean e1b9165439 Merge pull request #13931 from woocommerce/fix/register-admin-settings
If The $object is not really an object, don't continue. It's invalid.
2017-04-05 09:24:37 -07:00
Justin Shreve 6b6f48e7dc Prior to 3.0 there was a woocommerce_debug_posting filter that could be used to add rows to the environment section of the system status page. It was removed. This PR adds it back as woocommerce_system_status_environment_rows and aliases/deprecates the old one. 2017-04-05 09:13:20 -07:00
Mike Jolley ab4c921bd1 Wrap in try catch so WC_Data_Exceptions are caught on bad email. 2017-04-05 16:36:28 +01:00
Claudio Sanches 5a7af35d46 Removed extra clear parameter from addresses 2017-04-05 11:57:39 -03:00
Claudio Sanches f1df9e8dd9 Merge pull request #13955 from psiico/patch-1
Update class-wc-coupon.php
2017-04-05 11:52:23 -03:00
Claudio Sanches 2e7393d156 Merge pull request #13899 from woocommerce/fix/missing-array-declaration
Fixed missing array declaration
2017-04-05 11:49:10 -03:00
Ivo Santos b7dfc10dee Update class-wc-coupon.php
Updated get_amount() method description.
2017-04-05 16:32:02 +02:00
Mike Jolley e66efc1dcc Use wc_deprecated_function so notices are not triggered on ajax requests 2017-04-05 13:06:43 +01:00
Mike Jolley 4ad05dfa83 wc_get_object_terms should check it's not an error object
Fixes #13920
2017-04-05 12:06:37 +01:00
Mike Jolley 5770fb132e If The $object is not really an object, don't continue. It's invalid. 2017-04-05 11:10:27 +01:00
Mike Jolley 811d59feec Fallback to home URL if no shop page is set for system status security check.
Fixes #13921
2017-04-05 10:03:41 +01:00
Claudio Sanches 3920a12d71 Prevent RTL flip only color picker inputs
Fixes #13723
2017-04-04 17:27:11 -03:00
Mike Jolley b251973a66 Don't filter hidden grouped products
Fixes #13903
2017-04-04 20:33:36 +01:00
Claudio Sanches c88941a424 Removed extra taxes params.
Search, include and exclude are not handled by the REST API.
2017-04-04 14:54:01 -03:00
Claudio Sanches cf954fac1e Fixed missing array declaration 2017-04-04 14:53:05 -03:00
Claudio Sanches d881bf0500 Coding standards and changelog for #13867 2017-04-04 11:40:02 -03:00
Claudio Sanches faf0104b49 Merge pull request #13260 from JeroenSormani/product-data-tab-priority
Add 'priority' support to product data tabs
2017-04-04 11:33:48 -03:00
Claudio Sanches 620a92d6fd Merge pull request #13867 from woocommerce/fix/13788
Updated Emogrifier to 1.2.0
2017-04-04 11:30:47 -03:00
Claudio Sanches ca23ea9ef2 Merge pull request #13815 from woocommerce/fix-13813-1
Include WooCommerce endpoints to customize nav menu setting
2017-04-04 11:03:26 -03:00
Mike Jolley b2e4052e3b Stock qty should be wrapped in wc_stock_amount 2017-04-04 13:35:31 +01:00
Mike Jolley d917856378 Validate status if object_read
#13891
2017-04-04 12:39:35 +01:00
Mike Jolley 505813403e @used-by WC_Order::set_status comment
#13891
2017-04-04 11:52:54 +01:00
Claudio Sanches c89cb04194 Fixed api version compare for #13872 2017-04-03 21:41:00 -03:00
Mike Jolley c844ec6487 Merge pull request #13817 from woocommerce/improvement-13716
Allow setup wizard filtering
2017-04-03 19:26:39 +01:00
Claudiu Lodromanean ef7dbc75a1 bump down version number 2017-04-03 11:24:01 -07:00
Claudio Sanches 88445f4dd4 Merge pull request #13888 from woocommerce/fix-13887
Timezone can be + 30 mins
2017-04-03 15:22:05 -03:00
Mike Jolley 71ce5b85bc Merge pull request #13884 from woocommerce/fix-13875-13877
Private and variable product fixes
2017-04-03 19:16:35 +01:00
Mike Jolley bf601e7b23 docblock 2017-04-03 19:14:55 +01:00
Claudiu Lodromanean 82c3f93340 Change to single quotes 2017-04-03 09:54:24 -07:00
Mike Jolley 6b11bfbff0 Timezone can be + 30 mins
Fixes #13887
2017-04-03 16:01:18 +01:00
Mike Jolley 0a96f17747 Flip orderby 2017-04-03 12:12:13 +01:00
Mike Jolley c06fdc2e2e If product has_options, don't show qty in grouped product add to cart form
Fixes #13875
2017-04-03 12:05:28 +01:00
Mike Jolley 8598f82c8a If user can edit private products, search them
Fixes #13877
2017-04-03 12:04:59 +01:00
Mike Jolley 31cd2dcb90 Merge pull request #13853 from woocommerce/crud-security-hardening
CRUD security/hardening
2017-04-03 11:09:38 +01:00
Mike Jolley 75f79b3279 Se 20y limit on datepicker too 2017-04-03 10:46:37 +01:00
Mike Jolley da86e02331 Merge pull request #13872 from woocommerce/fix/missing-rest-api-v2-webhooks-settings
Include missing REST API v2 from webhooks options.
2017-04-03 09:51:31 +01:00
Claudio Sanches 014262c0cc Fixed returned data from WC_AJAX::get_customer_details() 2017-04-03 03:00:07 -03:00
Claudio Sanches 1fe791d7d8 Fixed WC_AJAX::get_customer_details() filter deprecated message 2017-04-03 02:59:07 -03:00
Claudio Sanches 984edf07d2 Missing period 2017-04-02 03:27:58 -03:00
Claudio Sanches 5b51b915f6 Fixed a typo 2017-04-02 03:24:52 -03:00
Claudio Sanches 4922e17876 Include missing REST API v2 from webhooks options. 2017-04-02 03:07:09 -03:00
Claudio Sanches f7db744a90 Updated Emogrifier to 1.2.0
Code changed to support PHP 5.2.

Used PHPCompatibility tool to help fix backwards compatibility.

Closes #13788
2017-03-31 17:19:35 -03:00
Claudiu Lodromanean 955f20be80 Do custom buttons before Cancel and Save buttons 2017-03-31 11:28:00 -07:00
Claudiu Lodromanean 0d84865b0f Pass wizard around 2017-03-31 10:32:19 -07:00
Mike Jolley 999a597055 Escaping in search orders 2017-03-31 17:14:08 +01:00
Claudio Sanches 5aaf23f8a5 Merge pull request #13845 from woocommerce/fix-13842
Dont redirect lost password on multisite global pages
2017-03-31 13:05:43 -03:00
Claudio Sanches cbca4dd5db Merge pull request #13856 from woocommerce/fix-13849
use term_taxonomy_id in upgrade routine
2017-03-31 12:17:54 -03:00
Mike Jolley 0c6c67ba6a Merge pull request #13855 from woocommerce/fix-13848
Only set dates if set/not null
2017-03-31 15:51:33 +01:00
Mike Jolley a2e60c51e3 use term_taxonomy_id in upgrade routine
Fixes #13849
2017-03-31 12:42:07 +01:00
Mike Jolley 8a201b64c5 Only set dates if set/not null
Fixes #13848
2017-03-31 12:38:18 +01:00
Mike Jolley 58040c94ae Increase order key length to 22 to support 2.6
Fixes #13850
2017-03-31 12:29:19 +01:00
Mike Jolley 14802a0307 Remove double unserialization 2017-03-31 12:10:20 +01:00
Mike Jolley b50312a1d8 Prevent bad timestamps being used for dates in reports and add nonce field 2017-03-31 11:50:11 +01:00
Mike Jolley 12e28a83f3 WC_Product_Variable_Data_Store_CPT::read_variation_attributes() cast to int 2017-03-31 11:37:12 +01:00
Mike Jolley 0d1cfe6fd2 Use prepare on `type` in payment token data store 2017-03-31 11:22:47 +01:00
Mike Jolley f1a699c259 Cleanup 2017-03-31 11:18:22 +01:00
Mike Jolley a443419006 remove extract and sanitize orderby against whitelist 2017-03-31 11:15:55 +01:00
Claudiu Lodromanean 4bae06b198 Dont redirect lost password on multisite global pages 2017-03-30 10:53:03 -07:00
Mike Jolley 5d62d3c844 Merge pull request #13844 from woocommerce/fix-13839
[REST API] Ignore 0 category while querying products
2017-03-30 18:06:04 +01:00
Claudio Sanches be8036869e [REST API] Ignore 0 category while querying products 2017-03-30 13:43:59 -03:00
Mike Jolley c83e725f99 Merge pull request #13835 from woocommerce/fix-13829
Update product rating counts after adding a rating
2017-03-30 11:16:40 +01:00
Claudiu Lodromanean 38cd9b4df7 Update product rating counts after adding a rating 2017-03-29 14:51:33 -07:00
Claudio Sanches 61ec9b3e51 Updated version to 3.1.0 2017-03-29 17:56:03 -03:00
Claudio Sanches 84e428abd3 Use correct attribute type label in attributes admin screen
This allow use a translatable label for attribute type instead of
forcing English for everybody.
2017-03-29 17:50:09 -03:00
Claudiu Lodromanean 27e1cffa30 Better way of passing on the next stepg 2017-03-29 11:22:55 -07:00
Claudio Sanches bbd54cc15f Merge pull request #13816 from woocommerce/fix-13813-2
Fixed titles and items from WC_Admin_Menus::nav_menu_links()
2017-03-29 14:27:38 -03:00
Mike Jolley 4e58d40404 Merge pull request #13814 from woocommerce/fix-13813
Load custom "WooCommerce endpoint" metabox only in Appearance > Menus.
2017-03-29 18:20:52 +01:00
Claudio Sanches e4a6882eaf Merge pull request #13825 from woocommerce/fix-13822
Filter empty tax values
2017-03-29 13:40:56 -03:00
Mike Jolley 399c141377 Fix slug updating in CRUD
Fixes #13824
2017-03-29 13:41:23 +01:00
Mike Jolley 82ffd9894f Filter empty tax values
Fixes #13822
2017-03-29 13:13:00 +01:00
Mike Jolley df13658dab docblock correction
Closes #13818
2017-03-29 11:47:37 +01:00
corsonr 0608eaf11a Fix 13820
Add the “description” class to `.cancel_sale_schedule` so that the
“cancel” link gets aligned properly with a margin left of 7 pixels.
2017-03-29 10:01:45 +02:00
Claudiu Lodromanean da0b048788 Allow setup wizard filtering 2017-03-28 14:45:12 -07:00
Claudio Sanches ffc3f0f0fd Merge pull request #13804 from woocommerce/fix-13790
[REST API] Fixed all products v1 query parameters.
2017-03-28 18:37:23 -03:00
Claudio Sanches 987fff3775 Fixed titles and items from WC_Admin_Menus::nav_menu_links() 2017-03-28 18:33:06 -03:00
Claudio Sanches 989d60a60a Include WooCommerce endpoints to customize nav menu setting 2017-03-28 18:07:00 -03:00
Claudio Sanches 6d38a74283 Merge pull request #13811 from woocommerce/fix-13807
Define default $discount_amount_html in wc_cart_totals_coupon_html()
2017-03-28 17:06:37 -03:00
Claudio Sanches 0964847e28 Load custom "WooCommerce endpoint" metabox only in Appearance > Menus.
Closes #13813
2017-03-28 16:06:26 -03:00
Claudio Sanches 1c369e41e0 Merge pull request #13810 from woocommerce/fix-typo
Fix typo
2017-03-28 15:22:45 -03:00
Claudio Sanches 29d86dfea6 Merge pull request #13812 from woocommerce/fix-13803
Use new_* hooks instead of created_*
2017-03-28 15:19:41 -03:00
Claudio Sanches fdbd442e05 Define default $discount_amount_html in wc_cart_totals_coupon_html()
Closes #13807
2017-03-28 15:10:05 -03:00
Claudiu Lodromanean 28726570bf Use new_* hooks instead of created_* 2017-03-28 11:05:45 -07:00
Akeda Bagus 0b416439c8
Fixed all typos of all files in includes/ directory.
Scanning and fixing were done automatically by codespell,
https://github.com/lucasdemarchi/codespell.
2017-03-29 00:58:51 +07:00
Michael Pretty 6660379f19 Cleanup of PHPDoc for interfaces, fixes #13808 2017-03-28 13:52:32 -04:00
Claudio Sanches afccb22f58 [REST API] Fixed all products v1 query parameters 2017-03-28 14:44:11 -03:00
Claudio Sanches 54c353d67f [REST API] Fixed taxonomies query arguments.
Fixed the follow error:

PHP Warning: explode() expects parameter 2 to be string, array given in
includes/api/v1/class-wc-rest-products-controller.php on line 156

Error caused since terms are sanitized by wp_parse_id_list() that
already creates an array.

Closes #13790
2017-03-28 14:34:41 -03:00