Mike Jolley
97d47fb576
Move zones to main settings
2016-01-05 11:23:15 +00:00
Mike Jolley
03ba8539f6
Stop coupon logic when 0 is hit so coupons can apply to other lines
...
Fixes #9870
2015-12-29 13:16:43 +00:00
Mike Jolley
fd9dac0f20
Revised get_cart_contents_weight and get_cart_contents_count
...
Closes #9656
2015-11-30 13:12:12 +00:00
Nicola Mustone
c9da4f928a
check if ABSPATH is defined
2015-11-06 10:22:19 +01:00
Claudio Sanches
5893875b0c
Removed period for file headers
2015-11-03 11:53:50 -02:00
Claudio Sanches
ee30b5b308
Fixed php docs standards
2015-11-03 11:31:20 -02:00
Claudio Sanches
0ff88deb98
Improved wc_coupons_enabled() name and description
2015-10-29 17:23:10 -02:00
Claudio Sanches
f64ea948f1
Replaced WC()->cart->ship_to_billing_address_only() to wc_ship_to_billing_address_only()
2015-10-28 16:03:24 -02:00
Claudio Sanches
29229ada45
Added deprecated description to WC_Cart methods
2015-10-28 16:01:03 -02:00
Claudio Sanches
1caaea7b33
Moved methods from WC_Cart to single functions
...
Changes:
- WC_Cart::coupons_enabled() to wc_is_coupons_enabled()
- WC_Cart::get_cart_url() to wc_get_cart_url()
- WC_Cart::get_checkout_url() to wc_get_checkout_url()
This methods can be used in any place, but WC_Cart() is present only on
the frontend.
2015-10-28 15:43:31 -02:00
Mike Jolley
b27635409c
New Session Handler
...
This merges and adapts
https://github.com/kloon/woocommerce-large-sessions for core. Closes
#6846 .
Differences:
- Rather than delete each cache key individually, this invalidates all
at once (idea from https://core.trac.wordpress.org/ticket/4476 )
- Removes ‘replace’ which increments session_id keys unnecessarily.
- Fixes remove/restore cart sessions from making it dirty each page load
Kudos to @kloon for the bulk of the work and testing on Woo.com.
cc @claudiosmweb
2015-10-07 14:47:29 +01:00
Mike Jolley
1defb3fb4f
Explain the fees method in more detail.
...
Closes #9231 Closes #9193
2015-10-01 10:05:16 +02:00
Mike Jolley
3e55364e3a
Merge pull request #8940 from woothemes/issues/8482
...
Tidy up how we're dealing with coupon postmeta around `_used_by` which can get big.
2015-09-15 16:42:51 +01: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
Mike Jolley
1c68137cf9
Only run maybe_set_cart_cookies if cart was loaded
2015-09-07 11:38:24 +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
31ed6c2531
woocommerce_adjust_non_base_location_prices test (false for now, should be true for current behavior)
2015-09-04 10:33:51 +01:00
Mike Jolley
91ac7fc974
To prevent discounts being applied in 'random' order (based on order added to cart), sort cart items based on subtotal during calculate_totals.
...
Closes #8987
@claudiosmweb @georgestephanis does this change look sane to you folks?
2015-09-01 13:16:55 +01:00
George Stephanis
a17addae0a
Migrate the actual querying of the underlying data structure.
...
Move it into the relative class for tidiness, and have it be called via
an access function.
2015-08-24 14:30:13 -04:00
Mike Jolley
7d27707043
Tax inclusive prices rounding issue
...
Remove rounding on cart_contents_total so total is calculated correctly.
Prevents issues with half rounded taxes and half rounded items.
Fixes #8776
2015-08-11 14:17:52 +01:00
Mike Jolley
257010695e
Readme, versions, develop blog links
2015-08-10 10:39:08 +01:00
Claudio Sanches
050d073678
Removed double ;; #8629
2015-07-21 19:49:05 -03:00
Claudio Sanches
409dd81ab9
Fixed unit tests for WC_Cart::get_remove_url()
2015-07-14 12:02:32 -03:00
Vignesh
0588c9fe1c
get_permalink to wc_get_page_permalink
...
changed get_permalink to wc_get_page_permalink on class-wc-cart.php
2015-07-14 17:49:29 +05:30
Mike Jolley
53916e38bb
Just return the URL
2015-07-13 11:00:10 +01:00
Vignesh
e063d068d7
get_permalink to wc_get_page_permalink
...
Changed get_permalink to wc_get_page_permalink.
2015-07-13 15:01:52 +05:30
Mike Jolley
45d89438c7
Ensure cart item key is set
2015-07-04 15:25:08 +01:00
Mike Jolley
049c95e724
Filter all item data
...
Closes #8361
2015-06-30 13:40:32 +01:00
Mike Jolley
1e5d508675
woocommerce_removed_coupon
...
since the other action is ‘woocommerce_applied_coupon’ Closes #8404
2015-06-19 13:50:59 +01:00
Mike Jolley
71673684fb
[2.3] get_discounted_price needs to check if taxes are enabled
...
Closes #8267
2015-06-05 11:24:59 +01:00
Mike Jolley
5920b88d5d
Add classes to tax and shipping labels/notices
...
Closes #8189
2015-05-27 16:17:36 +01:00
Nikki DelRosso
536d3096f2
Replaced missing end parenthesis
2015-05-14 14:37:17 -07:00
Nikki DelRosso
940c2369b0
Added method to check if cart is empty
2015-05-14 14:18:53 -07:00
Mike Jolley
02c346eb87
Filter before and after unsetting cart items
...
Closes #8110
2015-05-08 10:26:04 -07:00
Mike Jolley
8bb7a8c934
[2.3] Move action to prevent infinite recursion on login/restoring saved cart
...
Thanks @roykho. Follow up to #7852
2015-05-01 15:33:24 +01:00
Mike Jolley
5b1ea0dea1
Remove comments
2015-04-10 10:44:13 +01:00
Mike Jolley
68194bf0ed
Round discount totals
2015-04-10 10:28:46 +01:00
Mike Jolley
1f3365f206
Prevent infinite recursion by calling get_cart_from_session once
...
Closes #7852
A check was aded to prevent get_cart() usage before wp_loaded so all WC
components have a chance to load prior to the cart.
This should solve the edge-case recursion bug by first checking if the
woocommerce_cart_loaded_from_session action has already run. This is
triggered when loading the cart for the first time.
2015-04-09 12:49:20 +01:00
Mike Jolley
557a304326
Merge branch 'coupon-calc'
2015-03-24 15:52:38 +00:00
Mike Jolley
aed8ae36cf
woocommerce_calc_discounts_sequentially option to keep backwards compatible
2015-03-24 15:51:53 +00:00
Mike Jolley
b35e7f7d4a
Cast product IDs to int when adding to cart
...
Closes #7245
2015-03-24 12:56:13 +00:00
Mike Jolley
5e538b88e7
Use undiscounted price for coupons
2015-03-24 12:55:28 +00:00
Mike Jolley
ea910f7d4f
Merge branch 'wc-ajax-endpoint'
2015-03-23 12:53:53 +00:00
Mike Jolley
17fb3874e6
[2.3] Ensure coupon taxes are reset when calculating totals.
...
Fixes #7780
2015-03-20 15:03:50 +00:00
Mike Jolley
b729480838
Prevent cart hash becoming invalidated due to product/post data
2015-03-20 13:00:05 +00:00
Mike Jolley
70d125ae96
[2.3] Fix - get_total_discount() function with certain tax setups.
...
Revised how discounts/discount taxes are stored for consistency. Always
store ex. tax to make data retrieval easier, and to ensure totals are
correct after settings changes. Backwards compatibility maintained
through use of order versioning.
#7728
2015-03-16 12:17:09 +00:00
Mike Jolley
9f269f765d
Load persistent cart when empty, and Prevent cart being cleared when accessing the login page.
...
Closes #7636
2015-03-06 12:02:02 +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
Piotr Bogdan
9d75ad17e8
Fix backward compatibility for WC_Cart::$tax.
2015-02-11 17:06:17 +00:00
Mike Jolley
9afa2848d7
woocommerce_remove_cart_item_from_session with $key and $values
...
@helgatheviking
$this isn’t needed - WC()->cart to access cart class.
2015-02-11 12:30:54 +00:00
Kathy Darling
39fcc19ff6
trigger an action if an item is dropped from the cart session
2015-02-11 12:12:27 +01:00
Mike Jolley
0300ce2768
Undefined and dead variables in cart class
2015-02-03 15:23:25 +00:00
Manos Psychogyiopoulos
f8567680da
added remove/restore cart item hooks
2015-02-02 16:01:43 +02:00
Mike Jolley
e810672430
Remove reference to deprecated property
...
Closes #7249
Closes #7248
2015-02-02 12:38:37 +00:00
Mike Jolley
59359ef9b4
Try catch block in add_to_cart to allow plugins to abort the add to cart event
...
cc @claudiosmweb @barrykooij
2015-01-27 16:02:57 +00:00
Mike Jolley
2e38fc9041
Removed ID check - $the_coupon->is_valid() checks for existance
2015-01-27 12:11:58 +00:00
Mike Jolley
0b252d03f4
Added conditional to unset session itself
...
Closes #7182
2015-01-26 11:42:24 +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
8db443799b
Remove void/access public docblocks
2015-01-23 14:01:00 +00:00
Mike Jolley
1163e2af0b
Leave session data alone before calculation #7182
2015-01-23 13:58:38 +00:00
Claudio Sanches
f0c63b1fee
Restore all items from session, closes #7180
2015-01-23 11:48:49 -02: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
Claudio Sanches
8928029ecb
Updated the docblocks in class-wc-cart.php
2015-01-14 10:40:35 -02:00
Claudio Sanches
0b4074cf22
Merge pull request #7103 from woothemes/cart-undo
...
Cart undo
2015-01-14 10:38:31 -02:00
Mike Jolley
298ddb19ad
Save removed items to session
2015-01-14 12:36:03 +00:00
Claudio Sanches
11150a54c5
Fixed a typo
2015-01-14 10:24:01 -02:00
Mike Jolley
fcebc3b781
Missing Brackets in cart class
2015-01-14 11:16:21 +00:00
Claudio Sanches
3228fc0e67
Initial remove and restore cart methods
2015-01-07 16:52:17 -02:00
Mike Jolley
fb8f5fc750
Add notice when calling get_cart() before wp_loaded with fallback
...
#6873
2015-01-06 11:11:13 +00:00
Mike Jolley
d1fd2b3612
Fix zero-rated tax display and ensure tax_id is not empty when saving taxes
...
Closes #7040
2015-01-05 15:13:49 +00:00
Mike Jolley
1c696a10d3
Dev - Moved WC_Cart::get_cart_from_session() to a later hook (was init, now wp_loaded).
...
Closes #6873
2015-01-05 14:43:04 +00:00
thenbrent
e1560bc9c6
Remove mention of after tax discounts in comments
...
Related to #6830
2014-12-15 15:27:10 +10:00
thenbrent
a94cf06e4b
Deprecated notice for WC_Cart->discount_total
...
Related to #6830
2014-12-15 15:25:53 +10:00
Mike Jolley
c929b35f4f
$discount_total deprecated to prevent errors.
2014-12-12 16:39:24 +00:00
Mike Jolley
76ec750dbb
[2.2] remove_taxes needs to clear line_tax_data
2014-12-09 12:58:25 +00:00
Mike Jolley
76898699cd
Clarify variable comment #6830
2014-12-09 11:00:41 +00: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
Barry Kooij
23b38f9490
Typos
2014-11-29 12:35:36 +01:00
Barry Kooij
0ccf153227
Merge branch 'master' of github.com:woothemes/woocommerce
2014-11-29 12:33:43 +01:00
Barry Kooij
21b7fe60f6
Codestandards
2014-11-29 12:33:36 +01:00
Barry Kooij
c2321aeb94
Code standards.
2014-11-27 22:38:36 +01:00
Barry Kooij
d990daed57
Typo.
2014-11-27 22:36:46 +01:00
Nicola Mustone
b074f63a7e
Typo itme -> item
2014-11-26 19:07:13 +01: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
549d7ab2c0
Removed 'apply before tax' options for coupons - this should be the default core behaviour
2014-11-24 17:24:25 +00:00
Mike Jolley
8b4332a037
Refactors to shipping tax rate methods
2014-11-21 13:06:33 +00:00
claudiosmweb
dbcf4de41f
Fixed WC_Cart::get_cart_item() return type
2014-11-19 09:46:40 -02:00
Claudio Sanches
c7dc0947c4
Merge pull request #6788 from SiR-DanieL/undo_cart
...
Undo cart removal
2014-11-19 09:31:09 -02:00
Nicola Mustone
37ea3faf0a
Added missing get_cart_item
2014-11-18 20:48:45 +01: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
Nicola Mustone
7eecb87d34
Added get_undo_url
2014-11-18 17:30:52 +01:00
Mike Jolley
f600c5ec05
Limit coupons to X needs to persist across lines during calc
...
Fixes #6745
2014-11-14 16:38:33 +00:00
Mike Jolley
1d3b8db754
Move formatting logic
2014-11-14 16:22:01 +00:00
Mike Jolley
668e5ffb5c
Some refactoring of the coupon class to load data with less code
2014-11-14 16:22:01 +00:00
ThomasSultana
d3542a2192
#6740 Expose Previous Item Quantity
...
woocommerce_after_cart_item_quantity_update will now also pass the old quantity. #6740
2014-11-13 12:11:24 +01:00
Mike Jolley
18ebded7c5
Make check_cart_items consistantly placed
...
Closes #6708
2014-11-12 15:47:27 +00:00
Mike Jolley
cb8fe34b4c
get_base_tax_rates() + filter. Closes #6668
2014-11-11 11:56:17 +00:00
Marin Atanasov
8892b1aeb0
fixing a typo in comments in WC_Cart and its tests
2014-11-09 17:42:49 +02:00
Barry Kooij
6312683eec
Small codestyle fix to add_discount method.
2014-10-28 11:51:33 +01:00