Commit Graph

483 Commits

Author SHA1 Message Date
Mike Jolley c44100f9e7 wc_sanitize_tooltip 2015-03-13 09:14:28 +00:00
Mike Jolley 8554796c4b Show calculate total when shipping is needed, but shipping is hidden.
Closes #7650
2015-03-10 16:57:43 +00:00
Barry Kooij 44d8bee22c Use round instead of number_format 2015-03-09 18:10:49 +01:00
Barry Kooij 245a2cf4e7 Added the option to not round the line total. 2015-03-09 18:06:31 +01:00
Mike Jolley 3fc7a0ae65 Allow wc_attribute_label to support product-level attribute names.
Closes #7662
2015-03-09 13:40:07 +00:00
Mike Jolley fa0be55b01 transient cache dashboard reports
Closes #7641
2015-03-09 11:07:49 +00:00
Tamara Zuk d4b08daa64 Avoid 'division by zero' warnings
SHA 85befad283 does not avoid these
warnings if `$inc_tax` is `false`.
2015-03-06 17:46:31 -05:00
Mike Jolley 568a0fe4fa Tweak international delivery
Fixes #7651
2015-03-06 14:45:04 +00:00
Barry Kooij c45c4fd1a2 optimize PR#7605 2015-03-06 15:06:24 +01:00
Tamara Zuk 0e4cea8e85 Introduce `WC_Order::get_cancel_order_url_raw()` method 2015-03-03 02:01:17 -05:00
Claudio Sanches f2fc3b151f Merge pull request #7562 from tjuris/get-related-terms-filters
Apply filters to product/tag terms when querying related products
2015-03-02 10:39:31 -03:00
Tanel Jüris fe60425eeb Rename filter prefix from wc_ to woocommerce_ 2015-03-02 12:09:24 +02:00
Mike Jolley d98569327d Check payment title exists before output. 2015-03-02 10:03:30 +00:00
Barry Kooij ffc436957b Removed double @property comment 2015-02-26 17:14:06 +01: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 26487a5734 Fix - Settings API - allow multiselect fields to be emptied.
Closes #7542
2015-02-24 12:12:42 +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
Mike Jolley 4c411a69e7 * Fix - Saving an order needs to save the discount amount ex. tax like
the cart.
* Tweak - Show discounts inc. tax when showing order totals inc. tax.

Closes #7532

@barrykooij @claudiosmweb How does this look? Looks like we were saving
order discounts inconsistent with the cart/checkout
2015-02-23 17:39:57 +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
Paul Wilde c913316f8b Introduce wc_get_page_permalink. 2015-02-15 19:13:22 +00:00
Mike Jolley 30abed2f9e Merge pull request #7375 from tamarazuk/rating-count-fix
Fix average product rating when ratings are not required
2015-02-12 00:04:26 +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
Mike Jolley 43c24feffd Item meta removal query in order class. 2015-02-11 22:14:24 +00:00
Brent Shepherd f1fa927f57 Fix WC_Order::payment_complete() on back-end
SHA: c038001eab changed `WC_Abstract_Order::payment_complete()` to use
WC()->session->set( 'order_awaiting_payment' ) instead of
`WC()->session->order_awaiting_payment`, but `WC()->session` is only
set on front-end requests, meaning any extension that tries to complete
payment on an order from the back-end would cause a fatal error.
2015-02-10 16:55:47 -08:00
Claudio Sanches 22c4f02bbf Used filtered comment for woocommerce_new_customer_note action, closes #7349 2015-02-10 14:44:28 -02:00
Claudio Sanches 0558c3c286 Added woocommerce_product_get_rating_html filter for WC_Product class, closes #7337 2015-02-10 13:01:04 -02:00
Mike Jolley 840efcaa00 is_on_sale should compare type Fixes #7344 2015-02-10 12:34:53 +00:00
Mike Jolley 893babaaef woocommerce_product_get_weight filter Closes #7319 2015-02-10 11:18:38 +00:00
Mike Jolley 037242a9a2 More docblock tweaks 2015-02-03 16:03:28 +00:00
Mike Jolley 74abdf27c9 Cast to array 2015-02-03 15:06:08 +00:00
Mike Jolley f032a9c7dd Missing props 2015-02-03 14:44:57 +00:00
Mike Jolley f93e027b09 validate_multiselect_field had dead var 2015-02-03 14:05:09 +00:00
Mike Jolley f711ef32ce Missing bracket in previous commit #copypastefail 2015-02-03 13:16:41 +00:00
Mike Jolley 7c019c0c50 More docblocks; the check for WP_POST isn't needed as the second case (isset) runs regardless and is true for posts 2015-02-03 13:13:07 +00:00
Mike Jolley c038001eab Docblocks for order/product 2015-02-03 12:57:08 +00:00
Mike Jolley dc5b8d9710 @var 2015-02-03 12:28:15 +00:00
Mike Jolley 6bc269858a tweak docblock 2015-01-30 14:30:10 +00:00
Claudio Sanches d6023818fd Fixed the increase and decreate of coupons usage count 2015-01-30 12:14:34 -02:00
Claudio Sanches def250e912 Display taxes labels in order totals when order has refunded, closes #7229 2015-01-29 18:50:08 -02:00
Claudio Sanches c995f23354 Fixed WC_Abstract_Order coupon methods
@mikejolley
2015-01-26 16:48:03 -02:00
Claudio Sanches 8ff08e70af Fixed the WC_Abstract_Order::get_user_id() return type and fixed the orders customer_id 2015-01-26 14:41:19 -02:00
Mike Jolley 54e025939b Use get_post_status to avoid out of date order data.
Partly related to #7208
2015-01-26 13:07:29 +00:00
Brent Shepherd 95d87e28d6 Do not set property when calling __get()
SHA: 100b95a tweaked the `__get()` magic method in `WC_Product` to:
 * only call `get_post_meta()` once; and
 * set `$this->$key` to save the overhead of calling `__get()` every
   time that property needs to be accessed.

However, in the process, it also set an empty value (`''`) - the default
return value of `get_post_meta()` for every single value accessed on
the product object, meaning that any calls to `isset()` after attempting
to get that value would return `true`, even if `metadata_exists()` for
that property would return false (and no value is set in memory).
2015-01-23 15:01:10 -08:00
Claudio Sanches 04c584ccf6 Added properties docs for abstract product class 2015-01-23 15:51:33 -02: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 7f2a943075 Docblocks 2015-01-23 14:35:17 +00:00
Mike Jolley 2584041700 wc_price enhancements
- Renamed some 2.3 methods for consistency
- Allow more args to be passed to wc_price to control output
- Filter wc_price args which Closes #7188
- wc_get_price_decimal_separator function
- wc_get_price_thousand_separator function
- wc_get_price_decimals function
2015-01-23 11:50:32 +00:00
Mike Jolley 91de767442 Product constructor setting post incorrectly 2015-01-20 14:00:30 +00:00
Mike Jolley 5404006b29 MAP Url method 2015-01-20 13:31:02 +00:00
Mike Jolley de4129f9b2 WP_POST docs 2015-01-20 13:20:22 +00:00
Mike Jolley 5ab35bf212 Protected variables 2015-01-20 13:01:19 +00:00
Mike Jolley baea8f9ad4 Product class properties 2015-01-20 13:00:56 +00:00
Mike Jolley b941636068 Deprecate unused and pointless get_billing_address() get_shipping_address() methods
@claudiosmweb
2015-01-20 12:39:21 +00:00
Mike Jolley df66e0bcc8 Docblocks and code fixes in order class 2015-01-20 12:34:40 +00:00
Mike Jolley 2e624995b4 More magic properties and variable declarations in order class 2015-01-20 12:07:33 +00:00
Mike Jolley ea13b90340 Define magic properties for address data 2015-01-20 11:23:17 +00:00
Mike Jolley c0bea39c95 Seeing if magic properties are recognised 2015-01-20 11:06:15 +00:00
Mike Jolley a494bf84de Check if already set before setting in WC_Session.
Prevents unintended dirty sessions. Fixes #6846
2015-01-20 09:46:57 +00:00
Mike Jolley 3716329b16 Prevent error when user does not exist 2015-01-19 14:50:06 +00:00
Mike Jolley fef41c149c @uses WP_POST 2015-01-15 15:03:12 +00:00
Mike Jolley dc902ecfed form_fields docblock 2015-01-15 15:03:12 +00:00
Claudio Sanches 22da603567 Simplify commerce hosted payments feature 2015-01-13 13:40:43 -02:00
Andrew Benbow fa8aeb605c Update abstract-wc-order.php 2015-01-12 12:34:53 +00:00
James Koster 9cf1a8e7e8 is_sold_individually() tweak. closes #7041 2015-01-07 10:03:49 +00:00
Claudio Sanches d1f9cbfcf2 Merge pull request #6954 from SiR-DanieL/patch-2
Introduced woocommerce_get_product_attributes filter
2015-01-05 13:39:25 -02:00
Mike Jolley cab9e14fcd Use number format instead of round in get_item_subtotal()
Closes #6913
2015-01-05 11:42:10 +00:00
Mike Jolley f847b92a0f Merge branch 'wc-geolocation' 2015-01-05 10:18:25 +00:00
Claudio Sanches b4cc3cfcd5 Improved the widget title 2015-01-02 11:05:06 -02:00
Mike Jolley 7ef8f4d156 Invalidate unknown product transients Closes #6815 2014-12-30 15:27:08 +00:00
Mike Jolley 6800ee0ec3 Base vs default 2014-12-23 17:34:05 +00:00
Nicola Mustone d6bf1e81f9 added variation ID in order stock notes 2014-12-23 12:01:11 +01:00
Bryce 1c31af94f5 remove var keyword in WC_Shipping_Method 2014-12-16 18:38:58 +07:00
Nicola Mustone 7cec3c9f0b introduced woocommerce_get_product_attributes filter 2014-12-15 14:40:23 +01:00
Mike Jolley 100b95ae4f Tweak the get magic method in product class 2014-12-11 14:54:56 +00:00
Claudio Sanches a579ce4578 Merge pull request #6894 from franticpsyx/add_shop_prices_in_variation_data_array
Add display_prices in available_variations array
2014-12-10 15:52:57 -02:00
Mike Jolley fd15ac4c64 Allow a cancelled order to be marked paid, if there is a payment delay
Closes #6810
2014-12-10 16:54:08 +00:00
Claudio Sanches ec30dab6c4 Improved the colorpicker field 2014-12-09 10:10:59 -02:00
Claudio Sanches 5ea4e1b0a7 Created new colorpicker settings api field 2014-12-09 10:07:29 -02:00
Mike Jolley eba8206540 Merge branch 'tax-coupon-handling' Closes #6830
Conflicts:
	assets/js/admin/meta-boxes-order.min.js
	includes/api/class-wc-api-coupons.php
	includes/class-wc-cart.php
	templates/checkout/review-order.php
2014-12-03 12:33:15 +00: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
claudiosmweb 676549b4ab Fixed docblock for WC_Product::get_categories() 2014-12-01 22:09:42 -02:00
Bryce 83a457b29c improve get_rating_count() for rating-less reviews
Should close #6839.

According to `woocommerce_enable_review_rating` &
`woocommerce_review_rating_required`, it will do a different DB query,
so that when reviews without ratings are allowed, it will do a query
that counts those comments as reviews.
2014-11-27 14:32:09 +07:00
Mike Jolley 3c82331a8b Store discount 'tax' to show discounts on prices including tax more accuratly
Also deprecated some functions named after having 2 levels of discounts.
2014-11-25 13:05:03 +00:00
Mike Jolley 4a8c541fbf Remove 'order' discounts from classes 2014-11-25 11:05:14 +00:00
Barry Kooij 47cc448028 Added correct docblock. 2014-11-21 22:34:30 +01:00
Barry Kooij 4b539e7a9a Merge branch 'master' of github.com:woothemes/woocommerce 2014-11-21 22:31:17 +01:00
Barry Kooij 6ebadd572a Added correct docblock. 2014-11-21 22:31:09 +01:00
Michael Tieso 70d5fc834a Spelling correction - calculdate to calculate 2014-11-21 13:26:32 -08:00
Barry Kooij f8a161c406 Documentation improvement. 2014-11-21 22:16:15 +01:00
Barry Kooij ae1ed2b7f6 Added missing param docblock. 2014-11-21 22:14:13 +01:00
Barry Kooij b131f250b6 Added missing docblock return statement. 2014-11-21 22:12:37 +01:00
Barry Kooij 64227fe9d8 Added missing docblock 2014-11-21 22:12:03 +01:00
Barry Kooij 33b53c30b5 Updated docblock and added return statement. 2014-11-21 22:09:46 +01:00
Gerhard fa42c9d397 Change remove_order_items subqueries to inner joins.
Closes #6804
Hat tip Jason @ WPEngine
2014-11-21 09:18:31 +02:00
claudiosmweb b4e544e5dc Fixed coding styles and docblocks 2014-11-20 00:14:06 -02:00
claudiosmweb 6d4650dd7b Declared all Settings API variables 2014-11-19 23:11:08 -02:00
claudiosmweb 74ba11c189 Removed some unused code 2014-11-19 21:36:47 -02:00
claudiosmweb d4c480a6ea Fixed process_refund() docblock 2014-11-19 21:14:28 -02:00
claudiosmweb e87aefc8e0 Fixed missing initial $query = array() 2014-11-19 16:26:10 -02:00
claudiosmweb f34cead914 Removed old code in favor of wc_tax_enabled() and wc_prices_include_tax() 2014-11-18 14:45:29 -02:00
Mike Jolley e476a3f76b Merge pull request #6785 from SiR-DanieL/make_clickable
Automatically creates clickable links in item metas
2014-11-18 16:21:29 +00:00
claudiosmweb da43955416 Introduces the wc_get_default_location() function 2014-11-18 12:56:13 -02:00
Nicola Mustone 913cc42c06 Fixes https://github.com/woothemes/woocommerce-product-addons/issues/24 2014-11-18 14:22:21 +01:00
claudiosmweb 6077a10e44 Removed some dead variables 2014-11-18 10:42:54 -02:00
Mike Jolley e6a5825f8c Some shipping class tidyup 2014-11-17 16:30:18 +00:00
Mike Jolley 65ace6818b Merge pull request #6757 from tamarazuk/master
Introduce `woocommerce_product_is_on_sale` filter
2014-11-17 14:11:59 +00:00
claudiosmweb 24e17e36d3 Preventing errors when adding a widget using the WP Customize
Fixed coding standards and used methods from WC_Widget for start and end the widget
2014-11-14 23:12:59 -02:00
Tamara Zuk 20655d367d Introduce `woocommerce_product_is_on_sale` filter
This filter is useful for extensions like Measurement Price Calculator
which alter the product price quite a bit, but would still like the
sale badge to appear :)

Current workaround is to use three filters ( `woocommerce_get_price`,
`woocommerce_get_regular_price`, and `woocommerce_get_sale_price` )
which most extension may be using already, but not all need/want to
alter these prices.
2014-11-14 18:00:03 -05:00
Mike Jolley 2e2ce3c286 [2.2] During refunds, correctly set shipping tax totals
Fixes #6691
2014-11-14 12:52:43 +00:00
Marin Atanasov 7c5be1ebde fixing small typo 2014-11-11 22:32:06 +02:00
Mike Jolley cb8fe34b4c get_base_tax_rates() + filter. Closes #6668 2014-11-11 11:56:17 +00:00
Mike Jolley 69ca69ce52 Split up the product widget methods 2014-10-29 11:07:06 +00:00
Mike Jolley 2b8be95360 Remove # (hash) from get_order_number and add to strings instead as needed.
Most places use Order #X
Some places use Order Number: X

Both are now valid.

Fixes #6518
2014-10-24 14:53:43 +01:00
Mike Jolley e4b212cb3a [2.2] Fix stock report queries Closes #6565 2014-10-21 14:50:18 +01:00
Mike Jolley 1922b377e8 Corrected comment 2014-10-20 16:10:39 +01:00
Mike Jolley 8766cfa6df Tweak woocommerce_get_price_html_from_to in #6455 2014-10-17 16:25:54 +01:00
Mike Jolley 2668f0b8dd Merge pull request #6455 from paulwilde/from-to-filters
Introduce filters to get_price_html_from_text() and get_price_html_from_to()
2014-10-17 16:25:16 +01:00
Tamara Zuk f34187d5d3 Allow for non-integer stock quantities
It looks like a3b522aff8 removed this
ability.
This would be very useful for extensions like Measurement Price
Calculator.
2014-10-17 00:52:56 -04:00
Mike Jolley e03cf9c204 Set order_type property, and move actual order loading to separate method to make it easier for sub-classes to handle just that process.
Closes #6513
2014-10-14 14:25:53 +01:00
Mike Jolley 30edd0aa05 [2.2] Prevent notice if meta is not set Closes #6514 2014-10-14 11:26:14 +01:00
claudiosmweb 61e96b0a8b Prevent warnings in WC_Shipping_Method::is_available() when exclude countries 2014-10-10 23:01:19 -03:00
claudiosmweb 86ef09970a Prevented warnings when countries is empty in shipping methods.
Stopped this erros:

PHP Warning:  array_intersect(): Argument #1 is not an array in
wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-shipping-method.php
on line 182
PHP Warning:  in_array() expects parameter 2 to be array, null given in
wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-shipping-method.php
on line 194

@mikejolley
2014-10-10 22:46:19 -03:00
Mike Jolley e9393ddaf7 Settings API should use h3 rather than h4 when outputting titles 2014-10-08 15:06:38 +01:00
Mike Jolley 80716fbd46 Corrected get_return_url docblock 2014-10-07 11:09:38 +01:00
Mike Jolley 742594e207 Tweaks to order class 2014-10-07 11:09:29 +01:00
Mike Jolley 700369c386 Refund report changes
1. Ensure refund order_total is negative and reflects the full amount,
not just line items
2. Ensure transients are cleared when doing refunds
3. sales-reports order types so we can exclude refunds from pure
‘sales’ reporting
4. Tweak placement of refunds in legend.

Closes #6411
2014-10-06 13:39:53 +01:00
Paul Wilde 279c01d005 Introduce filters to get_price_html_from_text() and get_price_html_from_to(). 2014-10-02 20:11:34 +01:00
Mike Jolley e5ebeff99c Merge pull request #6383 from BFTrick/iss-6358
Refactoring Email Classes to Use One Send Method
2014-10-02 14:00:18 +01:00
mgiulio 56c2e5838d Fix get_cart_tax() comment 2014-09-29 17:11:34 +02:00
Patrick Rauland 1498198215 renaming and moving abstract-wc-email file 2014-09-23 10:12:43 -06:00
shivapoudel 303a5b28d0 Absolute path fix for abstract classes :) 2014-09-21 00:24:49 +05:45
Mike Jolley 493285f101 When updating order status, ensure its a valid WC order status.
Fixes #6285
2014-09-17 12:24:10 +01:00
Illimar Tambek fb19f5b9c5 Improve naming & comments 2014-09-17 11:27:43 +03:00
Illimar Tambek 386011ffae Allow getting rating count for a specific rating number 2014-09-17 11:03:10 +03:00
Mike Jolley ce1236bd95 Merge branch 'master' of https://github.com/woothemes/woocommerce
Conflicts:
	readme.txt
2014-09-16 10:48:46 +01:00
Mike Jolley a3b522aff8 Prepare update queries. 2014-09-16 10:45:28 +01:00
Barry Kooij 9723ed8096 Added settings sub title styling 2014-09-15 17:47:01 +02:00
Barry Kooij a93b107e55 removed unused default 2014-09-15 17:30:15 +02:00
claudiosmweb 066eb3c5b0 fixed wc_get_order_status_name() appear as wc 2.1 order status 2014-09-12 10:01:49 -03:00
claudiosmweb 591d3dc3be added methods to dynamically get the address fields in WC_Checkout::create_order(), closes #6226 2014-09-11 17:12:17 -03:00
Mike Jolley 7ae41bb4ed Fix - Ensure shipping address gets displayed - fixes needs_shipping_address() method. 2014-09-11 11:11:22 +01:00
Mike Jolley 3a4ba6e4c8 For regular products, ensure stock level saves on product creation. 2014-09-10 23:55:40 +01:00
Max Rice 55d3ba0d9d Fix warnings with WC_Order::get_item_total()
When calling WC_Order::get_item_total() for a fee, $item[‘qty’] is not
set which causes a notice and warning.
2014-09-09 21:23:46 -04:00
claudiosmweb 2f1533ff94 created the wc_get_order_status_label() function 2014-09-09 14:14:10 -03:00
claudiosmweb c85a71dcee fixed the order status label 2014-09-09 14:00:37 -03:00
Mike Jolley 27a20dd80e Docblock changes 2014-09-08 16:35:40 +01:00
Mike Jolley c4ef86d44e scrutinizer patches 2014-09-08 00:37:55 +01:00
Mike Jolley 1d13f767b3 Merge pull request #6157 from tamarazuk/coding-standards
Coding standards Part 1
2014-09-03 17:05:42 +01:00
Mike Jolley 349c85b639 Remove redundant wc_order_can_be_edited filter
#6154
2014-09-03 10:09:31 +01:00
Mike Jolley cb76bd7fb8 Merge pull request #6154 from thenbrent/is_editable
Add `WC_Abstract_Order::is_editable()` method and `'wc_order_is_editable'` filter
2014-09-03 10:06:04 +01:00
claudiosmweb 78c7fefe3e fixed some docblocks 2014-09-02 16:50:19 -03:00
thenbrent 3acfb14214 Store order's editable status in property
To save overhead of a function call
2014-09-02 12:27:26 -07:00
thenbrent 4dea71314f Add 'wc_order_is_editable' filter 2014-09-02 11:49:05 -07:00
thenbrent 78d932e6d2 Add WC_Abstract_Order::is_editable()
To centralise logic used to determine if an order can be edited from
the Edit Order screen
2014-09-02 11:47:56 -07:00
Tamara Zuk 9c7826319c Coding Standards: Abstract classes
* fixed indentation - swapped spaces for tabs at start of line, swapped
tabs for spaces min-line for alignment
* removed instances of `@return void` and `@access public`
* improved readability

@see http://make.wordpress.org/core/handbook/coding-standards/php/
2014-08-31 01:49:58 -04:00
justinstern 8417209d6c Improve, fix, WC_Payment_Gateway::get_transaction_url()
* Make the new get_transaction_url() method a bit more
flexible/convenient by passing in the full order object rather than
transaction_id
* Fix bug with core PayPal gateway get_transaction_url() override
2014-08-27 21:51:03 -04:00
Barry Kooij 94365791af Changed all use of get_product to wc_get_product 2014-08-19 12:09:29 +02:00
Mikel Martin 1ed0a9e9db Payment unavailable if max_amount greater than 0 and order totar greater than max_amount 2014-08-17 22:10:35 +02:00
Mike Jolley c51fac23e0 Availability with backorders not requiring notification. 2014-08-15 15:29:14 +01:00
Barry Kooij 6655188f0b Changed use of get_order with wc_get_order 2014-08-15 14:29:21 +02:00
Mike Jolley da483198f8 Simplify icons 2014-08-15 11:50:53 +01:00
Mike Jolley 3f53512c7f Fix up visibility of stock options, drop downs, and get_availability() when parent is managing stock for a variation.
Fixes #6017
2014-08-13 15:03:30 +01:00
claudiosmweb acb0699e94 updated the reason default value 2014-08-11 10:07:09 -03:00
claudiosmweb 066ba904cb added $reason param in WC_Payment_Gateway::process_refund() 2014-08-07 15:57:29 -03:00
Mike Jolley 760cd6861c Small refactor of is_visible
Also returns false for non-published products and fixes #5955
2014-08-04 11:19:58 +01:00
Mike Jolley 368e6b9412 Round shipping quote totals to store DP setting
Fixes #5888
2014-07-30 11:04:01 +01:00
claudiosmweb 70541f85e7 fixed the woocommerce_order_item_needs_processing filter 2014-07-29 15:08:08 -03:00
Mike Jolley c465c7235d Merge branch 'credit-notes'
Conflicts:
	includes/abstracts/abstract-wc-order.php
	includes/class-wc-order-factory.php
	includes/class-wc-post-types.php
	includes/wc-formatting-functions.php
	includes/wc-order-functions.php
2014-07-29 12:09:52 +01:00
Mike Jolley cdc0efed75 Merge pull request #5843 from maxrice/feature-orders-endpoint-issue-4160
Create/Edit/Delete orders via the REST API
2014-07-28 09:18:49 +01:00
Max Rice f656d57282 Add WC_Order::get_order_subtotal()
Convenience method to return the order subtotal

Part of #4160
2014-07-27 23:31:26 -04:00
Max Rice 3cc9952fea Include order item ID and rate ID in WC_Order::get_tax_totals()
Part of #4160
2014-07-27 23:31:02 -04:00
Max Rice f4feefc100 Fix WC_Order::get_user() 2014-07-27 23:30:21 -04:00
Max Rice e47ac33eb1 Add calculate_shipping() method to WC_Abstract_order
When the update_shipping() method is used, the order shipping amount is
not properly calculated unless the shipping costs are summed.

Part of #4160
2014-07-27 23:29:40 -04:00
Max Rice 1598d1b539 Add update methods to WC_Abstract_Order
These methods compliment the existing add_*() methods and provide a
consistent interface to add and update items for the order.

Part of #4160
2014-07-27 23:28:25 -04:00
Max Rice cca54879fa Fix misc docblocks 2014-07-27 23:23:59 -04:00
Mike Jolley 029bbbec39 Updated reports 2014-07-25 15:46:19 +01:00
Mike Jolley 19b6922044 Refund line items and taxes 2014-07-24 15:34:14 +01:00
claudiosmweb 5152457d9d improved the saving the new tax data 2014-07-20 01:28:16 -03:00
claudiosmweb 3a28c56876 save and display shipping taxes in order items meta box 2014-07-20 00:32:52 -03:00
claudiosmweb 93cf3c88bd initial implementation of order items taxes 2014-07-19 01:08:02 -03:00
claudiosmweb 50113fa531 fixed "Invalid argument supplied for foreach()" warning in line 127 2014-07-19 00:16:34 -03:00
Patrick Rauland e735fe45e0 fixing typos in abstract settings class 2014-07-15 16:41:28 -06:00
Mike Jolley 664dad3766 Process_refund()
#3164
2014-07-07 11:43:27 +01:00
Mike Jolley 979f2c0b48 Get transaction ID method 2014-07-07 11:43:06 +01:00
EmilEriksen 2f3793e49b pass to get_subtotal_to_display(). Fixes #5790 2014-07-04 20:29:17 +02:00
Coen Jacobs 86a4add087 Merge remote-tracking branch 'upstream/master' into order-factory-refactor
Conflicts:
	includes/class-wc-order.php
2014-07-03 13:38:55 +02:00
Mike Jolley 5e1bc4aeb1 Tweak get_availability 2014-06-27 14:46:39 +01:00
Mike Jolley c2475c2073 Merge pull request #5745 from claudiosmweb/4164-feature-products-api
Products API - PUT/POST/DELETE
2014-06-27 13:14:20 +01:00
Mike Jolley cc1d1e2237 Included method to define a link format for a transaction ID, set transaction ID manually, and tweaked display. 2014-06-27 13:12:10 +01:00
Mike Jolley 50a4c5bd23 Merge branch 'variation-stock-management'
Conflicts:
	includes/class-wc-product-variation.php
2014-06-27 11:15:42 +01:00
Mike Jolley 6390e387e2 Additional check for product coupons and sale product exclusion. Fixes #5697 2014-06-25 13:46:47 +01:00
Mike Jolley 0f6f04e017 Added wc_stock_amount() core function and replaced intval
#4612
2014-06-25 11:25:28 +01:00
claudiosmweb 770d81091d fixed a error when get the thumbnail by API
Fixed the error:

PHP Notice: Trying to get property of non-object in wp-includes/post-template.php on line 29
2014-06-24 14:56:33 -03:00
Mike Jolley 3ca70b30f5 Add sanity check to stock status change 2014-06-24 13:01:34 +01:00
darkrain 8f530a156c bugfix in get_related() - return trash posts 2014-06-24 13:11:10 +07:00
darkrain ea476af2ca add filter to method get_sku() 2014-06-19 22:28:49 +07:00
Mike Jolley cf3cca4c8e Merge branch 'feature-wc-create-order' 2014-06-18 16:07:29 +01:00