Commit Graph

29 Commits

Author SHA1 Message Date
Fredrik Forsmo f1920cb882 Improve docblock comments in various WC_Product classes
* Added comments to methods that was `method function`
2016-01-06 16:15:00 +01:00
Mike Jolley b59ec6de76 Move var definition to abstract 2015-11-14 16:39:53 +00:00
Mike Jolley 3a096b3b64 Remove transient from get_total_stock and combine into abstract
Grouped and variable methods were identical. Caching benefit comes from
get_children
2015-11-14 16:34:47 +00:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley 79010b634f Cast grouped product children to int
Avoids invalid or empty data and fixes #9416
2015-10-23 12:52:52 +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 68974655d6 Tweak visible child product query and cache 2015-06-08 13:18:23 +01:00
Tamara Zuk 4e36efe3af Missing argument on `woocommerce_product_is_on_sale` grouped product filter
Avoids a “missing argument” warning
2015-03-09 17:28:37 -04: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
Mike Jolley 74abdf27c9 Cast to array 2015-02-03 15:06:08 +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
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 7ef8f4d156 Invalidate unknown product transients Closes #6815 2014-12-30 15:27:08 +00:00
Bryce 7670a08ff4 Add filter 'woocommerce_grouped_children_args'
Allows people to filter the grouped product children, like changing the
order that the children products are displayed in, etc.
2014-12-29 13:13:26 +07:00
Mike Jolley 58904fcf83 Removed deprecated get_product() calls 2014-10-07 11:09:25 +01:00
shivapoudel 3fc03a184d Absolute path fix for class-wc-product-grouped.php 2014-09-21 00:42:09 +05:45
Mike Jolley 7f825a98ce Tweak get_children to look for empty transient 2014-08-12 12:06:18 +01:00
Mike Jolley 0f6f04e017 Added wc_stock_amount() core function and replaced intval
#4612
2014-06-25 11:25:28 +01:00
Patrick Rauland abd8a36ddc fixing typo in product classes 2014-03-21 16:41:32 -05:00
Coen Jacobs 3617316357 Updated expiry times for transients 2014-03-12 12:58:41 +01:00
Coen Jacobs 03163c54b0 set_transient calls should have expiration to prevent autoloading 2014-03-07 09:29:01 +01:00
splashingpixels 8a6848bdd3 syntax error missing semicolon on product grouped class 2013-12-10 09:38:36 -08:00
Mike Jolley 9e5c0fbf67 Get rid of "FROM" - display a price range, localisable. Closes #4222 2013-12-04 12:08:14 +00:00
Coen Jacobs c1a439eb99 Formatting functions woocommerce to wc refactor 2013-11-25 14:34:21 +01:00
Mike Jolley 6fd823dabd get_children should get published products only for grouped products. Closes #3880.
@coenjacobs This should go in .15
2013-10-11 13:25:34 +01:00
Mike Jolley ef49977905 add_to_cart_url add_to_cart_text and single_add_to_cart_text class methods allowing greater control with custom classes.
Closes #3484 and Closes #3143. Pinging @thenbrent as the handler was
originally his idea and I've killed it.

@helgatheviking In 2.1, add to cart URLs will only be used in loops, so
conditonal logic should no longer be neccessary. Single templates post
to themselves without the need for the URL.
2013-09-25 12:35:06 +01:00
Mike Jolley b93df4e706 Excl and incl. display options for prices, and suffix to add additonal info and prices. Closes #1506. 2013-09-19 16:31:54 +01:00
Mike Jolley c75ea04c1c classes -> includes 2013-06-11 14:25:30 +01:00