Commit Graph

490 Commits

Author SHA1 Message Date
Mike Jolley 32de28355a Merge branch 'master' into order-data-store
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-order-data.php
2016-11-21 14:45:46 +00:00
Mike Jolley b929916190 get_cart_total comment 2016-11-18 21:19:52 +00:00
Mike Jolley b1565cf0d6 Download update routine and interface 2016-11-18 19:29:37 +00:00
Mike Jolley 76b32c9aa5 WIP - Product CRUD (#12065)
* Created function to get the catalog visibility options

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* Hardcode the get_type per product class

* Initial look through getters and setters and abstract data

* Missing var

* Add related product functions and deprecate those in class.

* No need to exclude ID

* Fixed coding standards and improved the docblocks

* Get cached terms from wc_get_related_terms()

* Fixed wrong variable in wc_get_related_terms

* Use count() instead of sizeof()

* Sanitize ids later

* Remove unneeded comments

* wc_get_product_term_ids instead of related wording and use in other places.

get_the_terms is used here and also handles caching, something
wp_get_post_terms does not.

* Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.

* Bump template version

* Handle PR feedback: Remove duplicate regular_price update, allow changing of post status for products, remove deprecation for get_title since we might still offer it as a function

* Made abstract function useful

* External Product CRUD

* _virtual meta should be 'no', not taxable, in product unit test helper

* Grouped product class

* Tests

* Move children to meta and update test

* Use get_upsell_ids

* Spacing in query

* Moving and refactoring methods

* Availability html

* Tidy/add todos

* Rename method

* Put back review functions (still todo)

* missing $this

* get_price_including_tax/excluding_tax functions

* wc_get_price_to_display

* Price handling

* [Product CRUD] Variable (#12146)

* [Product CRUD] Variable Products

* Handle PR feedback.

* [Product CRUD] Grouped Handling (#12151)

* Handle grouped product saving

* Update routine

* [Product CRUD] Product crud terms (#12149)

* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function

* Product crud admin save routine (#12174)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function

* [Product CRUD] Product crud admin use getters (#12196)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Move settings into new files

* Refactor panels and use getters

* Use getters for variation panel

* Revert save variation changes for now

* Add todos

* Fix downloads

* REST API CRUD Updates

* Additional API updates/fixes. Added some todos

* Fix final failing tests and implementing setters/getters and attributes functionality.

* Fix comparison for is_on_sale and remove download_type from WC_Product.

* Add a wc_get_products wrapper.

* Remove the download type input from the product data metabox for downloadable products. (#12221)

* [Product CRUD] Variations - setters, getters and admin. (#12228)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* Feedback fixes

* Implement CRUD in the legacy REST API

* Handle PR feedback

* [Product CRUD] Getter setter proxy methods (#12236)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* get_prop implementation in abstract and data classes

* Implement set_prop

* Change handling

* Array key exists

* set_object_read

* Use get_the_terms() instead of wp_get_post_terms()

wp_get_post_terms() is a wrapper around wp_get_object_terms() which does not
use the object cache, and generates a database query every time it is used.

get_the_terms() however can use data from the object cache if present.

* Allow WP_Query to preload post data, and meta in wc_get_products()

Allow WP_Query to bulk query for post data and meta if more than
just IDs are requested from wc_get_products(). Reduces query count
significantly.

* [Product CRUD] Variable, variation, notices, and stock handling (#12277)

* No longer needed

* Remove old todos

* Use getters in admin list

* Related and upsells update for CRUD

* Fix notice in gallery

* Variable fixes and todos

* Context

* Price sync

* Revert variation attributes change

* Return parent data in view context

* Defer term counting

* wc_find_matching_product_variation

* Stock manage tweaks

* Stock fixes

* Correct id

* correct id

* Better sync

* Data logic setter fix

* feedback

* First methods for WP_Product crud

* Product set methods

* Fixed several erros while setting data

* Hardcode the get_type per product class

* Initial look through getters and setters and abstract data

* Missing var

* Fixed coding standards and improved the docblocks

* Get cached terms from wc_get_related_terms()

* Fixed wrong variable in wc_get_related_terms

* Use count() instead of sizeof()

* Add related product functions and deprecate those in class.

* No need to exclude ID

* Sanitize ids later

* Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.

* Remove unneeded comments

* wc_get_product_term_ids instead of related wording and use in other places.

get_the_terms is used here and also handles caching, something
wp_get_post_terms does not.

* Handle PR feedback: Remove duplicate regular_price update, allow changing of post status for products, remove deprecation for get_title since we might still offer it as a function

* External Product CRUD

* _virtual meta should be 'no', not taxable, in product unit test helper

* Bump template version

* Made abstract function useful

* Grouped product class

* Tests

* Move children to meta and update test

* Use get_upsell_ids

* Spacing in query

* Moving and refactoring methods

* Availability html

* Tidy/add todos

* Rename method

* Put back review functions (still todo)

* missing $this

* get_price_including_tax/excluding_tax functions

* wc_get_price_to_display

* Price handling

* [Product CRUD] Variable (#12146)

* [Product CRUD] Variable Products

* Handle PR feedback.

* [Product CRUD] Grouped Handling (#12151)

* Handle grouped product saving

* Update routine

* [Product CRUD] Product crud terms (#12149)

* Category and tag id handling

* Replace template functions

* Remove todo

* Handle default name in save function

* Product crud admin save routine (#12174)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function

* [Product CRUD] Product crud admin use getters (#12196)

* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Move settings into new files

* Refactor panels and use getters

* Use getters for variation panel

* Revert save variation changes for now

* Add todos

* Fix downloads

* REST API CRUD Updates

* Additional API updates/fixes. Added some todos

* Fix final failing tests and implementing setters/getters and attributes functionality.

* Fix comparison for is_on_sale and remove download_type from WC_Product.

* Add a wc_get_products wrapper.

* Remove the download type input from the product data metabox for downloadable products. (#12221)

* [Product CRUD] Variations - setters, getters and admin. (#12228)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* Feedback fixes

* Implement CRUD in the legacy REST API

* Handle PR feedback

* [Product CRUD] Getter setter proxy methods (#12236)

* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* get_prop implementation in abstract and data classes

* Implement set_prop

* Change handling

* Array key exists

* set_object_read

* Use get_the_terms() instead of wp_get_post_terms()

wp_get_post_terms() is a wrapper around wp_get_object_terms() which does not
use the object cache, and generates a database query every time it is used.

get_the_terms() however can use data from the object cache if present.

* [Product CRUD] Variable, variation, notices, and stock handling (#12277)

* No longer needed

* Remove old todos

* Use getters in admin list

* Related and upsells update for CRUD

* Fix notice in gallery

* Variable fixes and todos

* Context

* Price sync

* Revert variation attributes change

* Return parent data in view context

* Defer term counting

* wc_find_matching_product_variation

* Stock manage tweaks

* Stock fixes

* Correct id

* correct id

* Better sync

* Data logic setter fix

* feedback

* Prevent notices

* Handle image_id from parent

* Fix error

* Remove _wc_save_product_price

* Remove todo

* Fixed wrong variation URLs

* Fixed undefined $image_id in WC_Product_Variation::get_image_id()

* Allow wc_rest_prepare_date_response() handle timestamps

* Updated get methods on REST API for variations

* Use variations CRUD to save variations metadata

* [Product CRUD] Abstract todos (#12305)

* Get dimensions and weights, with soft deprecation

* Product attributes

* Ratings

* Fix read method

* Downloads

* Feedback

* Revert "[Product CRUD] Abstract todos (#12305)"

This reverts commit 9a6136fcf8.

* Remove deprecated get_variation_id()

* New default attributes method

* [Product CRUD] Product Datastore (#12317)

* Fix up tests in the product/* folder.

* Handle data store updates for grouped, variable, external, simple, and general data store updates for products.

* Variations & variable changes.

* Update -functions.php calls to use data store.

* Add an interface for the public product data store methods.

* Finished product factory tests

* Correctly delete in the api, fix up some comments, and implement an interface for the public variable methods.

* Fix up delete in all versions of the api

* Handle feedback

* Match protected decloration to parent

* Product crud abstract todos (#12316)

* Get dimensions and weights, with soft deprecation

* Product attributes

* Ratings

* Fix read method

* Downloads

* Feedback

* Fix up store

* Fixed method returning in write context

* Fix error in variation admin

* Check for parent value - fixes tax class

* Remove old/complete todos

* Allow set tax class as "parent"

* Removed duplicated sync

* Fixed wrong variation URLs

* Fixed undefined $image_id in WC_Product_Variation::get_image_id()

* Allow wc_rest_prepare_date_response() handle timestamps

* Updated get methods on REST API for variations

* Use variations CRUD to save variations metadata

* Remove deprecated get_variation_id()

* New default attributes method

* Fixed method returning in write context

* Allow set tax class as "parent"

* Removed duplicated sync

* Fixed coding standards

* TODO is not accurate.

* Should pass WC_Product instancies to WC_Comments methods (#12327)

* Use new method in abstract order class to prevent headers sent issue in tests

* Fixed variable description in REST API

* Updated how create initial product variation

* Fixed a few fatal errors and warnings in Products CRUD (#12329)

* Fixed a few fatal errors and warnings in Products CRUD

* Fixed sync functions

* Add variations CRUD to legacy API (#12331)

* Apply crud to variable products in legacy API v1

* New REST API do not need fallback for default attributes

* Apply variations CRUD to legacy API v2

* Legacy v2 - save default attributes

* Variations in legacy API v2 do not have descriptions

* Fixed legacy API v2 variations params

* Applied variations CRUD to legacy API v3

* Sync before save in legacy apis

* Punc

* Removed API todos

* Removed test

* Products endpoint tweaks (#12354)

* Var type already normalized on CRUD

* Let Product CRUD handle with validation, sanitization and conditional checks

* Set downloads using WC_Product_Download

* Stop try catch exceptions more than one time

* Handle WC_Data_Exception in legacy API

* Complete remove products when fails on creating

* On creating I mean!

* Already have a method to complete delete products

* Fixed standards using WP CodeSniffer

* get_the_terms() returns false when empty

* get_manage_stock returns boolean

@claudiosanches

* Merge conflict

* Variations API endpoint fixes

* Product CRUD improvements (#12359)

* args is not used any more - remove todo

* Added test for attributes

* wc_get_price_excluding_tax usage

* parent usage

* Fix rating counts

* Test fixes

* Cleanup after tests

* Make sure status transition code runs even during API calls, not just in admin.

* Default visibility

* Fix attribute setting in API

* Use get name instead of get title

* variation id usage

* Improved cross sell templates

* variation_data

* Grouped product sync

* Notices

* Sync is not needed in API

* Delete

* Rename interfaces

* Update counts in data store
2016-11-16 12:38:24 +00:00
Mike Jolley 599a2ad296 Product CRUD improvements (#12359)
* args is not used any more - remove todo

* Added test for attributes

* wc_get_price_excluding_tax usage

* parent usage

* Fix rating counts

* Test fixes

* Cleanup after tests

* Make sure status transition code runs even during API calls, not just in admin.

* Default visibility

* Fix attribute setting in API

* Use get name instead of get title

* variation id usage

* Improved cross sell templates

* variation_data

* Grouped product sync

* Notices

* Sync is not needed in API

* Delete

* Rename interfaces

* Update counts in data store
2016-11-16 12:17:00 +00:00
Mike Jolley 09ea4ba91f [Product CRUD] Variable, variation, notices, and stock handling (#12277)
* No longer needed

* Remove old todos

* Use getters in admin list

* Related and upsells update for CRUD

* Fix notice in gallery

* Variable fixes and todos

* Context

* Price sync

* Revert variation attributes change

* Return parent data in view context

* Defer term counting

* wc_find_matching_product_variation

* Stock manage tweaks

* Stock fixes

* Correct id

* correct id

* Better sync

* Data logic setter fix

* feedback
2016-11-09 16:10:37 +00:00
Mike Jolley 5f4dbdb733 [Product CRUD] Variations - setters, getters and admin. (#12228)
* Started on variation changes

* Stock functions

* Variation class

* Bulk change ->id to get_id() to fix variation form display

* Missing status

* Fix add to cart

* Start on stored data save

* save variation

* Save_variations

* Variation edit panel

* Save variations code works.

* Remove stored data code and fix save

* Improve legacy class

* wc_bool_to_string

* prepare_set_attributes

* Use wc_get_products

* More feedback fixes

* Feedback fixes
2016-11-09 16:05:49 +00:00
Rami Yushuvaev 93d55dade9 add translators comments 2016-10-29 20:32:38 +03:00
Claudio Sanches 657c312cae Fix strings case (#12069)
* Fixed case for all _e, esc_attr_e and esc_html_e strings

* Fixed case for all _n_noop strings

* Fixed case for all _x strings

* Fixed case for all __, esc_html__ and esc_attr__ strings

* Fixed a few more strings

* Fixed strings in unit tests

* Fix PayPal Standard case.

* Save Order text
2016-10-12 11:16:30 +01:00
Mike Jolley 96f05bb49a Add woocommerce_sort_by_subtotal_callback filter
Closes #11973
2016-10-08 13:22:52 +01:00
Aristeides Stathopoulos 734f284fa4 WordPress.PHP.YodaConditions.NotYoda 2016-09-08 01:32:24 +03:00
Aristeides Stathopoulos 39d4d4bd69 Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar 2016-09-02 05:40:36 +03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 0516e96843 PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket 2016-09-02 04:33:57 +03:00
Aristeides Stathopoulos d922d045a7 Squiz.Commenting.BlockComment.NoNewLine + indentation on class-wc-cart 2016-09-02 04:03:52 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Mike Jolley 1b2df3dd3b Merge branch 'pr/11797'
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:46:05 +01:00
Mike Jolley 047242515d Make API and CRUD use consistent keys and make use of data 2016-08-30 17:50:35 +01:00
Aristeides Stathopoulos e69fafbda7 WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter 2016-08-27 09:06:22 +03:00
Aristeides Stathopoulos f2730eea02 WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd 2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Mike Jolley 461ec4da16 Return false instead of throwing exception 2016-08-25 17:48:36 +01:00
Mike Jolley 3c13ce6fcd [2.6] Handle object when generate_cart_id is used.
Closes #11767
2016-08-25 10:58:11 +01:00
Mike Jolley 4ac4bcaa08 Merge branch 'master' into WC-CRUD
# Conflicts:
#	tests/unit-tests/cart/cart.php
2016-08-09 11:08:21 +01:00
Mike Jolley 54256c4123 Round prices being saved to DB 2016-08-05 14:06:51 +01:00
Mike Jolley 1bc9da3e91 Merge branch 'master' into WC-CRUD
# Conflicts:
#	includes/class-wc-coupon.php
2016-08-04 12:10:04 +01:00
Krzysztof Grabania 0276a3574b Removed unnecesary foreach loop 2016-07-22 14:55:51 +02:00
Kathy Darling cfafff192d add woocommerce_cart_id filter 2016-07-19 10:20:08 -05:00
Claudio Sanches 7778583340 Fixed wrong number of decimal precision, closes #11368 2016-07-11 17:26:54 +02:00
Mike Jolley 78142a8ebb Merge branch 'master' into WC-CRUD
# Conflicts:
#	includes/class-wc-checkout.php
#	includes/class-wc-coupon.php
#	includes/class-wc-customer.php
#	tests/unit-tests/cart/cart.php
#	tests/unit-tests/cart/functions.php
#	tests/unit-tests/coupon/coupon.php
#	woocommerce.php
2016-06-13 15:01:58 +01:00
Mike Jolley 730019ef18 scrutinizer best practice 2016-06-06 19:39:23 +01:00
Mike Jolley 3fd15ad50f Unused vars and code docs 2016-06-06 18:57:24 +01:00
Mike Jolley 2d2a5eb816 Hide empty taxes by default.
Closes #11050 @claudiosmweb
2016-06-06 13:50:21 +01:00
Mike Jolley c14993b90e No shipping methods = no shipping at checkout
#10987
2016-05-25 12:05:33 +01:00
Mike Jolley e00c3450c5 Discount rounding logic improvements
Instead of rounding the single item discount amount, this rounds the
line to the store DP setting before running tax logic.

Fixes #10963
Also works with #10573

Includes unit tests
2016-05-23 16:56:31 +01:00
James Golovich 96583d99c0 Pass $cart_item_key to 'woocommerce_get_undo_url' filter
I don't want users to automatically get an item re-added to their cart, I want to change the URL to send them back to the product page so they can re-add the item (if it is still available)
2016-05-19 13:46:22 -07:00
Ryder Ross 9a9dd7faf4 Fixing typo in comment 2016-05-10 09:17:28 -07:00
Fredrik Forsmo 4e19676acf Add `public` to `needs_shipping_address` method 2016-04-20 21:05:23 +02:00
Mike Jolley 6ae2fea045 Allow default address to be empty.
Fixes #10664
2016-04-18 14:51:39 +01:00
Mike Jolley a77735432b Use get_displayed_subtotal() to determine if conditions for coupons and free shipping is met.
@claudiosmweb

Closes #10711
2016-04-18 11:39:00 +01:00
JeroenSormani b77445787e Fix few typos and small docblock changes 2016-03-30 18:23:44 +02:00
Mike Jolley 1238a37124 Merge pull request #10576 from justinshreve/coupon-crud
Coupon CRUD
2016-03-18 11:12:32 +00:00
Justin Shreve ffc80ccd15 Start updating some usage, and start implementing the actual CRUD functions, and some new get/setters for username, email, etc. 2016-03-17 09:41:12 -07:00
Justin Shreve 3eacb992bc Address issues from Mike's Feedback:
* Rename individual use, free shipping, and exclude sale items to match their meta names closer.
* Sanitize emails when using set_email_restrictions
* Remove some unnecessary explict true checks
* Move ID into _data with the rest of the fields
* Fixed some spacing issues
2016-03-17 09:19:27 -07:00
Justin Shreve d738dec05d Coupon CRUD (WIP). 2016-03-17 09:19:27 -07:00
Mike Jolley 726728071b [2.5] Hide shipping row when calculator is disabled, and shipping costs are hidden
Fixes #10519
2016-03-10 12:26:52 +00:00
Mike Jolley 3dba3378c2 Merge pull request #10315 from woothemes/layered-nav-wp-query
Layered Nav Improvements
2016-02-12 11:59:40 +00:00
Mike Jolley 8fd336cb0e Prime cache to reduce queries per cart item 2016-02-09 23:36:15 +00:00
Mike Jolley 854bc5d744 Don't auto load options for cart - reduce queries 2016-02-09 23:14:38 +00:00
Mike Jolley 352184cc06 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	i18n/languages/woocommerce.pot
#	includes/abstracts/abstract-wc-payment-gateway.php
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/admin/settings/class-wc-settings-shipping.php
#	includes/wc-core-functions.php
#	uninstall.php
2016-02-05 14:58:48 +00:00
Mike Jolley e0c10e9be3 Allow has_coupon to detect any coupon applied
Closes #10251
2016-02-05 11:39:31 +00:00
Mike Jolley 1076854608 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/class-wc-shipping.php
#	includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
#	includes/shipping/flat-rate/includes/class-wc-eval-math.php
#	includes/shipping/free-shipping/class-wc-shipping-free-shipping.php
#
includes/shipping/legacy-international-delivery/class-wc-shipping-legacy
-international-delivery.php
#
includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-d
elivery.php
2016-01-11 11:48:18 +00:00
Mike Jolley d13fb8f482 Let check_cart_item_validity remove multiple items during check
Fixes #10050
2016-01-11 10:32:46 +00:00
Fredrik Forsmo 560dd06b1f Improve docblock comments in WC_Cart class
* Added comments to properties that don’t have any.
* Added comments to `remove_taxes` and `get_fees`
* Renamed boolean to bool
* Renamed integer to int
2016-01-06 15:47:16 +01:00
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
claudiosmweb dfde3f0028 Prevents adding trashed products in the cart 2014-10-24 20:12:55 -02:00
Barry Kooij 80dc739ef0 Add return statement to check_cart_items 2014-10-24 20:56:06 +02:00
Barry Kooij fbff5936d9 Added return statement to set_quantity 2014-10-24 16:02:31 +02:00
Barry Kooij 25d9b9e54a WC cart codestyle 2014-10-24 15:35:45 +02:00
Barry Kooij 77521f699b Optimized cart get_checkout_url method. 2014-10-21 15:08:51 +02:00
Chris Harvey 504253c909 Pass cart values to is_valid_for_product method 2014-10-10 15:44:18 +01:00
justinstern 26806660d4 include original $quantity with
woocommerce_add_to_cart_solid_individually_quantity filter
2014-09-24 16:54:15 -04:00
justinstern b1c9db3282 Adds a woocommerce_add_to_cart_sold_individually_quantity filter
Additional control over the quantity added when a product is "sold
individually"
2014-09-24 16:38:52 -04:00
Shiva Poudel 0b58d335b8 Reverted access public
Thanks! @tamarazuk
2014-09-15 08:17:19 +05:45
Shiva Poudel 6e58c45196 @access public in docblock 2014-09-15 01:40:24 +05:45
Shiva Poudel 40fe9ffd2f check_cart_item_validity() should have have public 2014-09-15 01:37:51 +05:45
Shiva Poudel 40ec40a411 Found and fix docblock comment 2014-09-15 01:35:22 +05:45
Shiva Poudel 8e09892064 better at get_option() @ L91 2014-09-15 01:33:13 +05:45
Shiva Poudel a4f6b0f9f9 Converted Indentations to tabs 2014-09-15 01:29:56 +05:45
Shiva Poudel f829e53a96 New line for docblock 2014-09-15 01:24:50 +05:45
Shiva Poudel ccf15ff06b Better docblock ;) 2014-09-15 01:22:48 +05:45
Shiva Poudel cf421b1c12 OOPS! again time constant 2014-09-15 01:18:46 +05:45
Shiva Poudel a2ab230efb Use of time constant 2014-09-15 01:17:14 +05:45
Shiva Poudel 1e7a3ae6d3 indendation Improvement for WC_Cart 2014-09-15 01:14:32 +05:45
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 602254851a Reset fees before calculating/adding them again
Fixes #6090

@claudiosmweb Do you see any issues with this?
2014-08-26 15:39:19 +01:00
Barry Kooij 94365791af Changed all use of get_product to wc_get_product 2014-08-19 12:09:29 +02:00
Nicola Mustone e49fe4c713 Added parenthesis
WP coding standard says to add always parenthesis
2014-08-07 18:26:48 +02:00
claudiosmweb 0617d53353 fixed undefined offset when added products in cart 2014-08-04 16:37:42 -03:00
Mike Jolley e02d94d305 Fix stock logic in 2.2 for variations with parents which manage stock
Closes #5957 @claudiosmweb can you review this change?
2014-08-04 10:51:54 +01:00
Mike Jolley 3f906b1ffa Change shutdown hook priority
Fixes #5860
2014-07-31 07:26:49 +01: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 134f31abb9 Taxes were stored backwards
cc @claudiosmweb
2014-07-23 11:37:02 +01:00
Mike Jolley ab36ec12d5 Merge pull request #5822 from helgatheviking/fix/add-to-cart
add_to_cart() return $cart_item_key
2014-07-22 18:32:55 +01:00
Kathy Darling 7e0121a0d9 update docblock for add_to_cart() method 2014-07-22 12:25:12 -04:00
claudiosmweb 5152457d9d improved the saving the new tax data 2014-07-20 01:28:16 -03:00
claudiosmweb 93cf3c88bd initial implementation of order items taxes 2014-07-19 01:08:02 -03:00
Mike Jolley 9e6caec3a2 set cookies on shutdown in case of redirect. 2014-07-11 15:40:18 +01:00
Mike Jolley 755001f19b Use order types where required 2014-07-11 12:43:42 +01:00
Kathy Darling 5a88e77959 add_to_cart() return $cart_item_key 2014-07-09 16:33:40 -04:00
Mike Jolley 137bf945ab Defer cart cookie being set 2014-06-30 15:14:32 +01:00
Mike Jolley ef3e728855 Setters + wc_create_order + wc_update_order for #4169 2014-06-11 15:10:03 +01:00
Mike Jolley f30e95663b Prefixes for queries 2014-06-03 11:29:01 +01:00
Mike Jolley 543ed6f207 Optimise cart class 2014-05-30 16:17:51 +01:00
Mike Jolley 42f9eab1bc [2.1] Fix coupon limit checks and enhance to check ID by provided email (if logged out)
Fixes #5535
2014-05-22 16:23:01 +01:00
Mike Jolley 8ccfd3a2ae Merge pull request #4618 from leewillis77/add_user_id_to_packages
[2.2] Add user ID to shipping packages
2014-05-15 10:44:14 +01:00
Mike Jolley ffb6dcee4a Brackets 2014-05-08 10:35:51 +01:00
Mike Jolley 55ad5bb0ad Remove title from product not purchasable message 2014-04-30 10:04:16 +01:00
Mike Jolley a6a65a2a9d typecast $used_by to array in case its not set. Closes #5350 2014-04-24 15:26:38 +01:00
Akeda Bagus 2a97f07d47 Typo fix. 2014-04-15 22:56:35 +07:00
Mike Jolley 937db45913 [2.2] Merge ship to billing and billing only options
+ update options, update files to use new option + function Closes #5284
2014-04-08 16:28:27 +01:00
Mike Jolley c981bb56ca Merge pull request #5230 from ChromeOrange/master
show shipping form filter
2014-03-31 11:56:57 +01:00
Mike Jolley 24c2c845b7 When removing base taxes, round to precision. 2014-03-31 11:12:12 +01:00
Andrew Benbow b3fc8cbdf6 Update class-wc-cart.php 2014-03-28 14:40:56 +00:00
Andrew Benbow a8e941513c Update class-wc-cart.php 2014-03-28 14:10:53 +00:00
Andrew Benbow 290043b108 Update class-wc-cart.php 2014-03-28 10:41:17 +00:00
Mike Jolley 9c913de1f2 Brackets 2014-03-25 11:36:35 +00:00
Brent Shepherd 49be7992e6 Add 'woocommerce_cart_taxes_total' filter 2014-03-20 17:54:18 -07:00
Mike Jolley 7bce58e9a1 URL decode not needed for custom text attribute names Closes #5155 2014-03-18 11:36:38 +00:00
Mike Jolley 6fcdccd73b Ensure attributes exist 2014-02-28 15:42:16 +00:00
Mike Jolley 2e8c2e7396 Fix after tax coupon amounts 2014-02-27 14:14:17 +00:00
Mike Jolley 5062de9767 Fix display of fee_taxes when spanning multiple tax classes Closes #4803 2014-02-20 16:39:57 +00:00
Mike Jolley 3be6664f05 Handle get_rate_code when no matching rate is found. Prevents notices. 2014-02-17 15:11:50 +00:00
Mike Jolley ca782212de define cart_session_data in constructor Closes #4822 2014-02-17 10:16:06 +00:00
Mike Jolley 551ca62c3d Fix saving of fee tax total Closes #4774 2014-02-13 15:42:17 +00:00
Mike Jolley ca09b0a8bc When add_to_cart is called, ensure the correct product_id is set for variations. Closes #4650 2014-02-12 13:05:20 +00:00
Mike Jolley e713fc68b8 return a string for get_cart_url and get_remove_url Closes #4724 2014-02-12 12:33:02 +00:00
Mike Jolley 875694e2eb Fix array sum and out of base subtotals 2014-02-05 11:45:26 +00:00
Coen Jacobs 60f04ee3b4 Merge pull request #4638 from woothemes/simple_fee_tax_calculation
Tax total for fees added to total fees
2014-02-05 12:32:25 +01:00
Coen Jacobs b5ad68ff2a Remove unused total fee tax variable 2014-02-05 12:31:23 +01:00
Coen Jacobs 3d7c2fc297 Tax fees should respect tax rates too 2014-02-05 12:30:47 +01:00
Coen Jacobs c9d39bcc8b Tax total for fees are already flattened 2014-02-05 12:03:56 +01:00
Mike Jolley e453e6f17d After tax coupons * qty Closes #4625 2014-02-04 13:35:04 +00:00
Mike Jolley ad84eea2f7 Ensure coupons get totalled when prices exclude tax. Closes #4604 2014-02-03 15:29:44 +00:00
Lee Willis 8446e73c49 Add user ID to shipping packages 2014-02-02 22:30:17 +00:00
Mike Jolley 8f2b9afe93 Check for the term object 2014-01-28 12:13:19 +00:00
Mike Jolley e04fafcba9 Correctly total and loop fee taxes Closes #4559 2014-01-22 14:10:11 +00:00
Geert De Deckere d563ff543d Improved notices in the add_to_cart() method
- Moved the button markup out of the translation strings.
- Used get_cart_url() instead of get_permalink( wc_get_page_id( 'cart' ) ).
- Added some newlines to improve code readability.
2014-01-04 23:46:43 +01:00
Mike Jolley 0c9962cf93 Get correct name Fixes #4385 2013-12-24 14:28:25 +00:00
thenbrent 8ad3326016 Only allow a fee to be added once 2013-12-13 13:10:25 -08:00
Coen Jacobs 61a783886d Suggested code changes in #4266 2013-12-03 15:03:25 +01:00
Gregory K f937c36250 Inconsistent return types: TODOs 2013-12-03 14:53:49 +01:00
Coen Jacobs 1cb8aa1724 Code styling fixes and return values for #4244 2013-11-29 10:15:58 +01:00
Gregory K 43ca01badc PhpDocs and TODO comments 2013-11-28 12:59:09 -05:00
Gregory K 5caf292456 PhpDoc fix in class-wc-cart 2013-11-25 10:06:06 -05:00
Coen Jacobs c800d83182 Merge pull request #4197 from tivnet/master
Corrected some PhpDocs in class-wc-cart
2013-11-25 06:43:38 -08:00
Coen Jacobs 47ae00be28 Page functions woocommerce to wc refactor 2013-11-25 15:07:22 +01:00
Coen Jacobs c1a439eb99 Formatting functions woocommerce to wc refactor 2013-11-25 14:34:21 +01:00
Coen Jacobs aaa14894ca Core functions woocommerce to wc refactor 2013-11-25 13:45:04 +01:00
Gregory K f2e34496d0 Corrected some PhpDocs in class-wc-cart 2013-11-25 07:40:16 -05:00
thenbrent 1ce5500b06 Add WC_Cart::get_cart_for_session() 2013-11-22 15:30:24 -08:00
thenbrent bb14495064 Check products are purchasable when restoring cart
If WC_Product::is_purchasable() is only called when adding a product to the cart,
it's possible to purchase products that aren't purchasable (but were when they were
added to the cart).
2013-11-22 15:14:08 -08:00
Mike Jolley 6ea8cad430 Related display fixes for attributes #4123 2013-11-18 14:11:40 +00:00
Coen Jacobs 90008d7143 Merge remote-tracking branch 'thenbrent/new_notice_api'
Conflicts:
	includes/shortcodes/class-wc-shortcode-cart.php
	includes/wc-message-functions.php
	woocommerce-ajax.php
2013-11-18 12:44:22 +01:00
Mike Jolley 197c0c76cc Only unset cookie if it exists #3513 2013-11-13 14:55:15 +00:00
Mike Jolley b116d7619d Ex tax calcs Closes #4100 2013-11-13 12:12:27 +00:00
thenbrent 0d45e19fcf Update calls to wc_add_error() function
Part of #4034
2013-11-12 20:59:39 -08:00
Mike Jolley 3fd02a57d0 Locales - store standardised values, and display using locale in admin #3862 2013-11-12 17:43:30 +00:00
Mike Jolley 95c0a67fdf Merge pull request #4017 from scottbasgaard/master
Define line_subtotal and line_subtotal_tax to avoid PHP notice in cart.
2013-10-29 09:49:55 -07:00
James Koster 1fbb6249ff Replaced → / ← on frontend with icons from our font. closes #4009 2013-10-28 09:45:59 +00:00