Commit Graph

98 Commits

Author SHA1 Message Date
Mike Jolley 61f7dd428e use shop_single instead of full image size for variations.
Closes #8764
2015-08-11 12:54:26 +01:00
Mike Jolley 42e99286c7 If all variations are out of stock, maintain pricing. 2015-08-11 10:33:47 +01:00
Mike Jolley 77b2316d80 Merge pull request #8754 from JeroenSormani/is_on_sale
FIx is_on_sale bug on variable products
2015-08-10 15:43:35 +01:00
JeroenSormani 95609928ba FIx is_on_sale bug on variable products 2015-08-10 16:36:40 +02:00
Mike Jolley 7363c85a2c Get filtered variation prices #8753 2015-08-10 15:34:10 +01:00
Mike Jolley 060fb16e2e Move Pre 2.4 handling for attributes - DRY
@claudiosmweb @franticpsyx
2015-07-28 16:20:51 +01:00
Mike Jolley 6626c68175 When syncing OLD products, update the attributes to 2.4 standard 2015-07-28 15:13:25 +01:00
Mike Jolley 794af1c013 When the stock level is changed via update_post_meta ensure the stock_status is kept in sync
Closes #8605
2015-07-27 19:04:08 +01:00
Mike Jolley 9a7893ba23 Moved variation dropdowns logic into wc_dropdown_variation_attribute_options() 2015-07-27 16:42:22 +01:00
Mike Jolley dcd273d343 Rename transient - 45 chars is max legnth 2015-07-27 10:57:14 +01:00
Claudio Sanches 9e41552342 Removed all "@return void" 2015-07-16 16:55:48 -03:00
Claudio Sanches 8d2a98eab1 Improved some docblocks 2015-07-16 16:29:01 -03:00
Mike Jolley 30b01ff9b6 Add filter to force price display 2015-07-09 16:15:05 +01:00
Mike Jolley 5f8a5bcb63 We don't need get_transient_version for children transients because other products do not affect this. 2015-07-09 16:02:26 +01:00
Mike Jolley 65f19d5ca7 Ajax variation handling
If there are more variations than the threshold allows (set to 20
currently) this loads the matching variation via ajax instead of inline
in the HTML. #8477
2015-07-09 15:56:20 +01:00
Mike Jolley 622b11ae9f Add version check to prevent pre-2.4 logic kicking in when not needed
@claudiosmweb
2015-06-16 15:10:53 +01:00
Mike Jolley 12396f4296 Attempted bw compat by comparing sanitised text to real text 2015-06-11 15:42:18 +01:00
Mike Jolley 89f7e15052 Save full version of text based attributes when dealing with variations 2015-06-11 14:43:02 +01:00
Mike Jolley aaaef5bfcf [2.3] Incorrect wc_product_total_stock_ transient
Closes #8337
2015-06-10 18:28:34 +01:00
Mike Jolley 5771969c2c Prevent notices in get_children 2015-06-09 10:32:40 +01:00
Mike Jolley 68974655d6 Tweak visible child product query and cache 2015-06-08 13:18:23 +01:00
roykho b812b2fd94 add dynamic variation description feature 2015-05-14 10:56:26 -07:00
Mike Jolley 906940791a Merge branch 'variation-prices-sync' 2015-05-01 15:01:14 +01:00
Illimar Tambek 3e9c56a5ca Pass current variation to woocommerce_hide_invisible_variations filter 2015-04-29 12:16:58 +03:00
Nicola Mustone d2af01df5b scrutinizer suggested tweaks 2015-03-27 16:15:40 +01:00
Mike Jolley 302fca886c ID needs to be part of transient 2015-03-25 16:27:11 +00:00
Mike Jolley 8cb2ca86d7 Store variation ID in transient 2015-03-25 16:23:19 +00:00
Mike Jolley c76a08aad2 woocommerce_variation_prices filter 2015-03-25 15:48:51 +00:00
Mike Jolley 01c13a52cd Fix price/sale price listings 2015-03-25 15:23:28 +00:00
Mike Jolley 99fcb77262 woocommerce_get_variation_prices_hash array 2015-03-25 14:52:33 +00:00
Mike Jolley 0ab0a12156 _has_multiple_variation_tax_rates no longer needed 2015-03-25 13:37:11 +00:00
Mike Jolley 9f50d41b97 New approach to getting min/max variation prices using transients
New method will get all prices and store in array format. Cached based
on user location (tax) and product transient hash.

Fixes #6504
2015-03-25 13:35:49 +00:00
Mike Jolley d9455994c8 Use 30 days instead of year for transients to avoid bugs in memcache plugins.
Closes #7520
2015-02-24 12:02:56 +00:00
Scrutinizer Auto-Fixer 19f660171e Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-01-23 14:37:20 +00:00
Mike Jolley 186f223d92 Fix indents in #7174 2015-01-23 11:17:27 +00:00
Diego Zanella dbeeb6d7b5 Fixed bug in is_on_sale() method 2015-01-22 16:05:59 +00:00
Diego Zanella 04bf4fecd2 Added/altered product filters to make them work consistently
* WC_Product_Variable::get_variation_regular_price() now always calls the "woocommerce_get_variation_regular_price" filter (removed early exit).
* WC_Product_Variable::get_variation_sale_price() now always calls the "woocommerce_get_variation_sale_price" filter (removed early exit).
* WC_Product_Variable::is_on_sale() now calls the "woocommerce_product_is_on_sale" filter.
* WC_Product_Grouped::is_on_sale() now calls the "woocommerce_product_is_on_sale" filter.
2015-01-22 13:02:43 +00:00
Mike Jolley 36841589cf Merge pull request #7123 from splashingpixels/variation-price-issue
correctly display FREE if all prices are zero ref #6929
2015-01-16 16:14:02 +00:00
splashingpixels eee5d16844 changed comparison type to non strict in case a string is passed 2015-01-16 06:52:49 -08:00
splashingpixels 187f6729e9 correctly display FREE if all prices are zero ref #6929 2015-01-15 20:19:33 -08:00
Brent Shepherd ed0593fc4a Set variable product virtual/downloadable property
Based on whether all children are virtual/downloadable.

Fixes #7072.
2015-01-15 17:06:09 -08:00
Mike Jolley 7ef8f4d156 Invalidate unknown product transients Closes #6815 2014-12-30 15:27:08 +00:00
Mike Jolley 4a57cd3f7d 'Free' for variable products without a range of prices. Closes #6929 2014-12-30 15:13:34 +00:00
Spencer Hill d8c8d37fd6 Using post_status of 'any' causes a conflict with the WP Invoice Plugin by Usability Dynamics resulting in the Select Box for Variable Subscriptions - when the WooCommerce Variable Subscriptons Plugin is installed and activated - not functioning and returning an error to the user on the front end. Since it's filtering out the Trash status, and others, anyway when being displayed on the front end we found that setting the post_status to publish resolved the issue and doesn't appear to have adverse affects elsewhere. 2014-12-19 13:21:15 -08:00
Manos Psychogyiopoulos 4b04701cc8 add display_prices in variation data
The commit introduces 3 changes:
1. It adds 2 extra fields to the available_variations array,
display_price and display_regular_price, to be used by extensions in
cases like
https://github.com/woothemes/woocommerce-product-addons/issues/19
2. Introduces a get_display_price() function in WC_Product to retrieve
product prices incl or excl tax relative to the
woocommerce_tax_display_shop setting.
3. Fixes a minor issue where passing a 0 price to
get_price_including_tax() or get_price_excluding_tax() results in a
wrong output.
2014-12-03 11:28:04 +02:00
Mike Jolley c2ce3b0d88 Tidy 2014-10-14 14:25:53 +01:00
Mike Jolley 26186f815a Fix potential error if variation doesn't exist 2014-10-09 11:20:46 +01:00
Mike Jolley 58904fcf83 Removed deprecated get_product() calls 2014-10-07 11:09:25 +01:00
Manos Psychogyiopoulos 0966519adc woocommerce_get_children filter from 2.2 2014-10-01 19:42:20 +03:00
James Koster 63f45a8720 variation visibility, based on #6182. #5661 2014-09-26 17:22:43 +01:00