Max Rice
3befe1426f
Introduce WC_Product::get_id() method
2015-12-04 15:17:25 -05:00
Patrick Garman
eb3dc97df9
Add filter to WC_Product::is_virtual()
2015-12-03 20:52:27 -05:00
Mike Jolley
869dee2726
No need for rating HTML as we have no styling
2015-12-02 11:50:41 +00:00
Mike Jolley
328a84d278
Floatval to get rid of stray decimals
2015-12-02 11:46:51 +00:00
Claudio Sanches
753014da5a
Merge pull request #9631 from woothemes/transient-tweaks
...
Transient tweaks
2015-11-21 22:48:14 -02:00
Claudio Sanches
d931405156
Fixed the type returned when get_stock_quantity() is empty
...
Since expect return an integer value, we can't return an empty string.
This can generate some kinds of errors like:
'' >= 1 returns false
'' >= -1 returns true
This can be a problem comparing stock quantity like we do in
WC_Product::has_enough_stock()
But using null we have:
null >= 1 returns false
null >= -1 returns false
cc @mikejolley
ref #9598
2015-11-14 15:53:36 -02: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
Mike Jolley
3082c5bba6
wc_related_ and get_related method tweaks
...
Remove use of multiple expiring transients. See function docblock for
explanation.
2015-11-13 21:14:42 +00:00
Mike Jolley
3ceed757bd
Store rating and reviews in postmeta rather than transients
...
These don’t change often, and as long as we listen for comment count
update events will be kept in sync.
2015-11-13 20:41:20 +00:00
Claudio Sanches
5893875b0c
Removed period for file headers
2015-11-03 11:53:50 -02:00
Claudio Sanches
efa19f799d
Fixed some coding standards for docblocks
2015-11-03 10:28:01 -02:00
Mike Jolley
aec0e0e327
supports() method which mirrors gateways
...
Closes #9471
2015-11-02 11:23:50 +00:00
Kathy Darling
856d192bff
Use generic `ajax_add_to_cart` class for adding items in the loop to the cart via ajax.
2015-10-30 12:54:49 -05:00
Ari-Pekka Koponen
11ab216993
WC_Product __get should check for False instead of empty
2015-10-28 12:45:54 +02:00
Mike Jolley
dda0f0c2bd
Check for existence of global attribute when you get_attributes() for a product
...
Fixes #9141
2015-10-08 13:55:01 +01:00
Mike Jolley
0c56fe0844
Merge pull request #9149 from JeroenSormani/stock-changes
...
Add get_stock_quantity filter
2015-09-17 10:57:47 +01:00
JeroenSormani
cb75a1e8af
Add get_stock_quantity filter
2015-09-17 10:19:04 +02:00
Mike Jolley
0830543c4f
Add disclaimer to woocommerce_adjust_non_base_location_prices
2015-09-15 16:01:11 +01:00
Mike Jolley
4959937689
Merge branch 'universal-pricing-test'
2015-09-15 15:57:04 +01:00
James Koster
8eebc7c900
Free is an amount!
...
All product prices are wrapped in `span class=“amount”`. To make
themers lives easier let’s be consistent. When the product is free the
price should still be wrapped.
2015-09-04 11:19:52 +01:00
Mike Jolley
d90d562b42
Leave excl function alone
2015-09-04 10:57:22 +01:00
Mike Jolley
e08f8d8902
Apply woocommerce_adjust_non_base_location_prices to all prices
2015-09-04 10:48:50 +01:00
Mike Jolley
afd0e9edd4
Pass $this to filters
...
#8722
2015-08-05 13:49:27 +01:00
Nicola Mustone
9822edda0b
better naming
2015-08-05 13:54:20 +02:00
Nicola Mustone
9140ca0f76
added cross and up sells IDs filters
2015-08-05 11:01:47 +02: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
Claudio Sanches
9e41552342
Removed all "@return void"
2015-07-16 16:55:48 -03:00
Mike Jolley
f42fa85eab
Variation tax status should always come from parent
2015-07-15 19:12:12 +01:00
Justin Shreve
eb85cd1682
Add $price and $qty to get_price_suffix so custom values can be passed into get_price_including_tax and get_price_excluding_tax
2015-06-29 19:24:48 +00:00
Mike Jolley
bb4c303c39
get_type has no args
2015-06-08 12:22:26 +01:00
Mike Jolley
3c87e39ce6
Product get_type() method
2015-06-08 12:20:39 +01:00
Mike Jolley
28d838c5cd
[2.3] Related posts tweaks
...
Remove real randomness and add transient caching to improve performance.
The above was not worth the cost of the query - only users refreshing a
product page would see a difference.
2015-05-25 15:40:28 +01:00
Mike Jolley
b8bcd24edd
[2.3] Combine transients for get_rating_count
...
@claudiosmweb
2015-05-25 02:00:20 +01:00
Mike Jolley
1b73322874
[2.3] Replace max_related_posts_query with wp_count_posts
2015-05-25 01:20:31 +01:00
Mike Jolley
c6dae2b286
Merge pull request #7834 from SiR-DanieL/scrutinizer-issues
...
Small tweaks and style fixes
2015-03-30 10:33:27 +01:00
Nicola Mustone
95cdb0390f
fix related products error
2015-03-27 17:52:21 +01:00
Nicola Mustone
214a0b669f
splitted get_related for complexity
2015-03-27 17:28:26 +01:00
Nicola Mustone
d2af01df5b
scrutinizer suggested tweaks
2015-03-27 16:15:40 +01:00
Mike Jolley
ca934ba0d9
Add get methods for length, width, height and add filters
...
Closes #7617
2015-03-24 16:52:26 +00:00
Mike Jolley
f04ebeb78e
has_enough_stock - use get_stock_quantity
...
Closes #7779
2015-03-20 10:40:53 +00:00
Mike Jolley
fa0be55b01
transient cache dashboard reports
...
Closes #7641
2015-03-09 11:07:49 +00:00
Tanel Jüris
fe60425eeb
Rename filter prefix from wc_ to woocommerce_
2015-03-02 12:09:24 +02:00
Tanel Jüris
d9a568bbea
Apply filters to product/tag terms when querying related products
2015-02-25 16:02:31 +02: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
6c9562112f
Fix Related post offset.
2015-02-20 16:17:45 +00:00
Mike Jolley
44cf2c2b70
Filter before max_related_posts
2015-02-16 16:48:11 +00:00
Mike Jolley
5c1a0d92e8
Related posts - replace ORDER BY RAND() with random offset.
...
Closes #7436
2015-02-16 13:16:18 +00:00
Mike Jolley
969e2d3b18
Stock status when updating out of stock product.
...
Fixes #7402
2015-02-16 12:14:10 +00:00
Tamara Zuk
7eaae2d561
Fix average product rating when ratings are not required
...
If ratings are not required, the total rating count was counting all
reviews which skewed the average rating. In other words, reviews with
no rating were counted as a “zero” rating in the average rating
calculation. This bug was introduced in
83a457b29c
which provided a fix for #6839 .
This change introduces a new product method `get_review_count()` which
can be used to accurately calculate the total number of reviews for a
product. Some instances of `get_rating_count()` were replaced with
`get_review_count()` where appropriate. Additionally, the
`single-product/rating.php` template was adjusted to display the
correct number of customer reviews and ratings in rich snippets. I’ve
also included the `bestRating` rich snippet detailed
[here](http://schema.org/AggregateRating ). The version number was
adjusted to 2.3.2 on that template as I think this is a larger change.
2015-02-11 17:55:16 -05:00