Mike Jolley
2c915ba961
Allow quantities less than 1, but not 0.
2018-01-05 12:48:24 +00:00
Mike Jolley
effbf87e22
API should generate or set file ID when setting downloads. Closes #18330
2018-01-03 11:02:38 +00:00
Mike Jolley
4eaf1afb88
Cleanup session callback.
2017-12-15 15:14:05 +00:00
Mike Jolley
df04d0c4a2
phpcs
2017-12-15 15:13:48 +00:00
Boro Sitnikovski
59c1aa0928
Add since tag
2017-12-14 15:43:35 +01:00
Boro Sitnikovski
080ece9588
Change method name
2017-12-14 15:37:42 +01:00
Boro Sitnikovski
e1b753122e
Deprecate the function as a whole
2017-12-14 10:23:51 +01:00
Boro Sitnikovski
e061cb122c
Fix warning for plugins that override this method with the specified parameter
2017-12-14 10:09:25 +01:00
Claudiu Lodromanean
7c06e7d63d
Merge pull request #18008 from woocommerce/update/rounding-17970-17863
...
Rounding fixes/line item rounding
2017-12-07 08:34:15 -08:00
Claudiu Lodromanean
804c771296
Merge pull request #17683 from woocommerce/feature/unsupported-theme
...
Unsupported theme enhancements
2017-12-07 08:05:29 -08:00
Mike Jolley
320392fc59
is_visible should ensure product is is not trashed
...
Closes #18023
2017-12-06 13:47:09 +00:00
Mike Jolley
05e7eaae03
get_meta_data return array values
...
Closes #17997
2017-12-05 13:14:12 +00:00
claudiulodro
d60456cc73
Resolve conflicts and bring up to date with master
2017-12-04 13:56:59 -08:00
Mike Jolley
7da5780c00
Store unrounded, calc rounded.
2017-12-04 21:40:12 +00:00
Mike Jolley
0a9485c465
Merge branch 'master' into feature/11259
...
# Conflicts:
# assets/css/admin-rtl.css
# assets/css/admin.css
# includes/admin/list-tables/class-wc-admin-list-table-products.php
# includes/class-wc-install.php
# includes/wc-update-functions.php
2017-12-04 14:14:03 +00:00
urosmil
18e7b25eab
Filter for line items in abstract-wc-order.php ( #17759 )
...
* Filter for line items in abstract-wc-order.php
When creating custom product class there are places where line items is only value that can be handled. This is one of that places causing subtotal values after checkout not to be calculated and displayed.
* Extension to woocommerce_order_get_items filter
This is extension to filter as get_items() is used for different classes and types. This way it would be possible to distinct which type is called for items.
* Removed filtering inside subtotal function
$types parameter is added as parameter for filter inside get_items() function so previous commit is reverted as there is no need for it.
2017-11-23 10:00:03 +00:00
claudiulodro
5513dc4546
Update with master
2017-11-22 11:02:14 -08:00
Claudio Sanches
69c8a87f41
Display correct deprecated version for hooks
2017-11-22 15:21:32 -02:00
Claudio Sanches
11772ca015
Fixed coding standards
2017-11-22 14:55:12 -02:00
Claudio Sanches
d27410eacc
Introduced new wc_deprecated_hook function as alias to _deprecated_hook
2017-11-22 14:47:22 -02:00
claudiulodro
99aefc91f3
Changes from feedback
2017-11-21 14:08:17 -08:00
The Dramatist
1783953f15
Admin metaboxes views translation escaping fix ( #17776 )
...
* Data escaped and validated. Plus translator comment documentation added.
* If it should be int then we should change the empty string default parameter to 0 as in 'if' condition checking 0 and empty string are same.
* Extra bracket removed.
* Indentation is fixed now.
* The taxonomy object should not be assigned to a variable before checking if this is a taxonomy or not.
* echo esc_attr__ replaced by esc_attr_e and visually tested.
* As I use WordPress VIP Coding Standard, they were marking them as warnings. But now it's fixed again.
* Escaping fix
* Extra Bracket Fix Again
2017-11-21 17:50:30 +00:00
Mike Jolley
8b02185596
Merge pull request #17817 from JeroenSormani/exclude-virtual-from-shipping-tax
...
Exclude virtual tax classes from calcluation for shipping taxes
2017-11-21 13:21:13 +00:00
claudiulodro
a73436bdcd
Merge remote-tracking branch 'origin/master' into HEAD
2017-11-20 14:43:12 -08:00
claudiulodro
b64b26d030
Variable products are on backorder if all children are backordered
2017-11-20 11:19:06 -08:00
JeroenSormani
14e5bcd51d
Exclude virtual tax classes from calcluation for shipping taxes
2017-11-20 20:14:23 +01:00
Mike Jolley
21e51b9fc6
Merge pull request #17692 from woocommerce/update/16925
...
Add add_to_cart_description method and aria-labels to cart buttons in the loop
2017-11-17 12:35:50 +00:00
claudiulodro
0390cf3e26
Bring up-to-date with master
2017-11-16 10:06:07 -08:00
claudiulodro
bb7f1b1273
Logic tweaks
2017-11-15 13:04:24 -08:00
claudiulodro
be6f9d68bc
Automatic transitions for variables
2017-11-15 12:08:19 -08:00
claudiulodro
68e23911ba
Automatically transition stock statuses
2017-11-15 10:48:39 -08:00
Mike Jolley
128b826791
Merge branch 'master' into tweak/order-screens
...
# Conflicts:
# assets/css/admin-rtl.css
# assets/css/admin.css
# includes/admin/class-wc-admin-post-types.php
2017-11-15 13:36:13 +00:00
claudiulodro
db117d6344
Backordered products should count as in stock
2017-11-14 14:54:11 -08:00
claudiulodro
cf7bc61b99
Better code
2017-11-14 13:49:22 -08:00
claudiulodro
c312cc35b1
Add new onbackorder stock status
2017-11-14 13:40:03 -08:00
Mike Jolley
9e79ceff08
Merge branch 'master' into feature/unsupported-theme
2017-11-14 17:03:35 +00:00
Mike Jolley
babde741db
Add add_to_cart_description method and aria-labels to cart buttons in the loop
2017-11-14 11:45:16 +00:00
Mike Jolley
3e7968d37b
Merge branch 'master' into pr/16418
2017-11-13 14:37:18 +00:00
Claudio Sanches
b04c7bd71e
Merge pull request #17628 from woocommerce/fix/17624
...
Change how line items are saved in API
2017-11-09 17:36:39 -02:00
Mike Jolley
2a3ace9853
Merge branch 'master' into feature/17550-archives-template-support
2017-11-09 17:34:57 +00:00
Mike Jolley
1a7d7dd127
Widget base url
2017-11-09 11:24:29 +00:00
Mike Jolley
1b22d97be2
Combined get_page_base_url
2017-11-09 11:16:47 +00:00
Mike Jolley
93da46e66e
phpcs
2017-11-08 12:20:49 +00:00
Mike Jolley
db4e630600
Replace thumbnail names
2017-11-07 18:48:51 +00:00
Mike Jolley
1f7ecd9fb9
Merge branch 'master' into tweak/order-screens
...
# Conflicts:
# assets/js/frontend/checkout.min.js
2017-11-01 16:52:21 +00:00
Tim Howe
abea378245
Variation Displayed in Cross-Sell and Upsells with Parent's Post Status set to 'draft' and 'pending review' ( #17423 )
...
* Fix - #17413
Update the `json_search_products` function to use the
`wc_products_array_filter_visible` filter rather then the
`wc_products_array_filter_editable` filter
Added an additional if condition to the `is_visible` function to check
if the product had a parent and it's post status
* remove additional comment from code to keep it clean
* Reverted filter
* Updated the is_visable to check parent product post status using WooCommerce class methods
* Updated the `if empty` check to make it is compatible with older versions of php
* Removed the empty check infavor of just testing on the returned value
Updated the way we are retrieving the partent product object
* Moved the `$parent_product` variable assigment out of the if statement.
2017-11-01 12:52:58 +00:00
Mike Jolley
7c74e77849
handle tax removal in order class
2017-10-31 13:37:57 +00:00
Mike Jolley
bc7484f473
Merge branch 'master' into pr/16959
...
# Conflicts:
# includes/abstracts/abstract-wc-order.php
2017-10-31 13:33:09 +00:00
Mike Jolley
9521a0ba1f
Improve tax class check and handle non-taxable items
2017-10-30 13:23:15 +00:00
Ewout Fernhout
029e93fd4f
Use item tax class rather than product tax class for getter
...
Fixes #17449
2017-10-30 11:04:56 +01:00
Mike Jolley
e72a297842
Break up logic so is callable is only checked on internal meta keys
2017-10-27 16:23:05 +01:00
Cesar Rodas
32da25c4f1
Improved "is_internal_meta_key"
...
Improved is_internal_meta_key to check if the meta_key has a setter or a getter before returning TRUE and calling doing_it_wrong
2017-10-23 22:22:31 -03:00
Mike Jolley
39443d23e5
Fix meta data clone for products
2017-10-16 21:05:29 -07:00
Rodrigo Primo
fa0e5569f8
Add 'parent' to the list of valid tax classes for product variations
...
Commit d9f9e74bd
added a check to `WC_Product::set_tax_class()` to only accept valid tax classes, but this created a bug for product variations as this type of product has an extra tax class called 'parent'.
This commit fixes this problem by adding a new method to `WC_Product` that returns a list of valid tax classes. `WC_Product_Variation` then override this method, returning another list including the tax class 'parent'.
Fixes #17024
2017-10-09 16:20:03 -03:00
Rodrigo Primo
d769ef24f2
Coding standards fixes
2017-10-09 16:19:24 -03:00
Claudio Sanches
b25e08e1cc
Merge pull request #17058 from woocommerce/fix/17047-alt
...
Fix meta data returns in API using JsonSerializable
2017-10-04 11:48:46 -03:00
Mike Jolley
240a321dd0
Revert get_meta_data changes and return array of WC_Meta_Data objects
2017-10-04 14:12:43 +01:00
victorfreitas
9dcfe4883a
Fix error when invalid parent term
2017-10-03 17:59:58 -03:00
Mike Jolley
7460189752
Handle WC_Meta_Data in get_data() and API
...
Fixes #17003
2017-10-02 13:12:33 +01:00
Diego Zanella
e93ad155df
Added support for "is_vat_exempt" flag on orders
...
Added check for the presence of the "is_vat_exempt" meta against an order. When present, such information is used during tax calculation to remove the taxes applied to an order.
2017-09-27 18:56:11 +01:00
Mike Jolley
00b8e395f8
Unused variable
2017-09-27 17:12:50 +01:00
Diego Zanella
5e23770d74
Added actions before calculatins order totals and taxes
2017-09-27 16:07:02 +01:00
Mike Jolley
5dcde7b093
Use discounts class for validation logic
2017-09-27 12:54:04 +01:00
Mike Jolley
25337b21ce
If sorting by date in the REST API, fallback to ID
...
Ref: #16911
2017-09-25 13:31:25 +01:00
Brent Shepherd
81b9160973
Add offending key to error message
2017-09-15 15:58:34 -07:00
Brent Shepherd
f404affff4
Tweak internal meta notice
...
To remove ambiguity with accessing properties via $object->meta_key
syntax, which was deprecated with WC 3.0.
2017-09-15 15:48:53 -07:00
Mike Jolley
d09d7d1358
wc_get_relative_url/wc_is_external_resource helpers
2017-09-08 12:20:03 +01:00
Mike Jolley
ee3ea1b739
Only make http resources relative - https can be left alone.
...
Closes #16737
2017-09-07 16:55:29 +01:00
Mike Jolley
d08bf4b489
Add option to disable validation when applying coupons
...
Closes #16720
2017-09-06 11:26:34 +01:00
Mike Jolley
2a71a66fc9
Order screen refinements and preview window
2017-09-04 17:42:31 +01:00
Mike Jolley
fe847630b2
Tests when tax is not enabled
2017-08-29 12:38:35 +01:00
Mike Jolley
31a90bdd85
Handle prices including tax calcs
2017-08-25 18:21:27 +01:00
Mike Jolley
4ac1ed84cc
Fallback no coupon data
2017-08-25 16:15:28 +01:00
Mike Jolley
2682d86660
Move comment
2017-08-25 16:09:56 +01:00
Boro Sitnikovski
3cd1bedade
Set coupon virtual state on when initializing virtual coupons during recalculation
2017-08-25 17:07:07 +02:00
Mike Jolley
961c190985
Comments
2017-08-25 14:42:56 +01:00
Mike Jolley
1e65a918d5
Pull meta to apply coupons which do not exist
2017-08-24 17:08:45 +01:00
Josh Smith
49c7449e8b
Merge remote-tracking branch 'upstream/master'
2017-08-23 22:41:04 +00:00
Claudiu Lodromanean
56e1207903
Merge pull request #16583 from woocommerce/update/apply-fees
...
Improved apply fees
2017-08-23 13:35:18 -07:00
Mike Jolley
2beddc59a7
docblocks
2017-08-23 14:38:00 +01:00
Mike Jolley
e0de3643bc
ID is unused
2017-08-23 14:28:25 +01:00
Mike Jolley
9483a7ec19
invalid return
2017-08-23 14:27:30 +01:00
Mike Jolley
c60859bf3c
types
2017-08-23 14:27:10 +01:00
Mike Jolley
a7b697b679
type checks
2017-08-23 14:25:41 +01:00
Mike Jolley
714c4c672e
unused prop
2017-08-23 14:21:42 +01:00
Mike Jolley
be042ee8f3
Set to amount before calc
2017-08-23 12:24:33 +01:00
Mike Jolley
804feb9333
Store fee amount and prevent totals going negative
2017-08-23 12:15:06 +01:00
Josh Smith
148fa16055
[ #12517 ] Removing unnecessary isset on check for download id in WC_Product
2017-08-23 02:27:42 +00:00
Josh Smith
413444c616
Merge remote-tracking branch 'upstream/master'
2017-08-20 04:09:17 +00:00
Mike Jolley
d9f9e74bd9
Only set valid tax classes in product abstract
2017-08-18 17:06:22 +01:00
Mike Jolley
e99471c0cd
Removed manual discounts code
2017-08-18 10:36:10 +01:00
claudiulodro
9a47146716
Fix discounts rounding issues
2017-08-15 14:11:25 -07:00
claudiulodro
ae80d12d80
Merge master
2017-08-14 11:12:09 -07:00
Mike Jolley
be11c1089f
Fix tests
2017-08-14 16:03:50 +01:00
Mike Jolley
7ddfe0703b
Store coupon item taxes
2017-08-14 15:57:51 +01:00
Beka Rice
c54b0ecd9d
Pass WC_Shipping_Method instance to availability filters
2017-08-11 16:36:18 -04:00
Mike Jolley
b826d02f9b
Split tax across items for discounts
2017-08-11 17:53:49 +01:00
Josh Smith
fe01910b8b
Fixing spacing on WC_Product and WC_Install
2017-08-11 16:49:49 +00:00
Mike Jolley
3496e8dca4
Match order of cart discount
2017-08-11 16:16:09 +01:00
Mike Jolley
56726deb5a
Fix recalculate_coupons
2017-08-11 13:52:40 +01:00
claudiulodro
28f0431c56
Coupon usage counts
2017-08-10 11:27:13 -07:00
claudiulodro
f1e6fd53bd
Prevent double coupons
2017-08-10 11:14:01 -07:00
Mike Jolley
db87fc68b9
Fix refs
2017-08-10 16:33:21 +01:00
Mike Jolley
30c80c6ad5
Fix tax recalc
2017-08-10 16:22:17 +01:00
Mike Jolley
22d6c789ab
herpa derpa
2017-08-10 15:57:34 +01:00
Mike Jolley
e90fb6d54f
fix discount apply and save
2017-08-10 15:33:01 +01:00
Mike Jolley
cd8fb23884
Add ability to get local item rather than from DB
2017-08-10 14:38:02 +01:00
Mike Jolley
e2599d83c8
Apply methods
2017-08-10 14:22:27 +01:00
Mike Jolley
3dc9f06f6a
Remove fixed discounts correctly
2017-08-10 12:06:03 +01:00
Mike Jolley
06381f28bd
Edit items rather than recreate
2017-08-10 11:38:09 +01:00
claudiulodro
a416ebe09b
It kind-of works.
2017-08-09 14:55:35 -07:00
Mike Jolley
5874fb8715
Type and sum fix
2017-08-09 19:11:02 +01:00
Mike Jolley
c556facd41
Fix percent coupon and display
2017-08-09 19:02:10 +01:00
Mike Jolley
f71dc64d35
Manual discounts and negative taxes
2017-08-09 18:53:10 +01:00
Mike Jolley
2def474421
Order calc
2017-08-09 16:19:10 +01:00
Josh Smith
d8b6b2042a
Merge remote-tracking branch 'upstream/master'
2017-08-08 21:20:35 +00:00
Mike Jolley
e9c3ebebdc
Merge branch 'master' into feature/discounts-class
...
# Conflicts:
# includes/abstracts/abstract-wc-data.php
# woocommerce.php
2017-08-08 15:49:59 +01:00
Mike Jolley
3778918a0a
Merge branch 'master' into pr/14751
...
# Conflicts:
# includes/class-wc-structured-data.php
2017-08-08 15:28:31 +01:00
Claudio Sanches
53ea3c8b96
Merge branch 'master' into fix/16347
2017-08-07 16:36:36 -03:00
Mike Jolley
847e4859f8
Include add_payment_method in gateway abstract
2017-08-07 12:38:50 +01:00
Josh Smith
644ac674d7
[ #12517 ] Replace download_id on customer download and product download with static UUID instead of filename based hash, to preserve download links, logs, and permissions across filename changes
2017-08-05 04:42:31 +00:00
Mike Jolley
6af275da6e
Only return tax classes if product is taxable.
...
Fixes #16241
2017-08-03 08:44:02 +02:00
Mike Jolley
f47bb39a06
Merge pull request #15479 from woocommerce/add/poc-no-managing-meta-directly
...
Proof of concept to error when internal meta props are accessed directly
2017-07-27 15:54:24 +01:00
Mike Jolley
306db69eaf
Remove order subclass
2017-07-27 10:49:47 +01:00
claudiulodro
cfb04f0ead
Boolval wasnt added til php 5.5
2017-07-26 13:48:36 -07:00
claudiulodro
d15a2f5f6a
Make tax calculation optional
2017-07-26 13:46:50 -07:00
claudiulodro
77838d05bb
Fix unknown item variable
2017-07-26 10:25:08 -07:00
Mike Jolley
b9b4336c1b
Removed some duplicate keys
2017-07-26 16:50:34 +01:00
Mike Jolley
abdb325d83
Order items
2017-07-26 15:47:30 +01:00
Mike Jolley
1faae6a7aa
Order subclass
2017-07-26 14:32:43 +01:00
Mike Jolley
250dabaf41
WC_Cart_Totals subclass
2017-07-26 12:44:06 +01:00
Jaydeep Rami
46d3638089
Fix missing return statement ( #16148 )
...
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
* Fix missing return statement
2017-07-20 18:01:14 +01:00
Jaydeep Rami
3522857d23
Fix typo in WooCommerce plugin ( #16135 )
...
* Fixed typo
* Fixed more typo
* Fixed more typo
* Fix tyop
* Fix more typo
* Fix more typo
* Fix typo
* Fix typo
* Fix typo
* Fix typo datatime object
* Fix short name of compat
* Fix typo: update short name
* Fix typo "deactive" to "deactivate" and short BW - Compat
* Fix typo "Backwards compat"
* Fix typo 'parameters'
* Fix more typo 'pararmeters'
* Fix typo 'compund'
* FIx typo order
* Fix typo
* Fix typo 'incorrecly'
* Fix typo 'genarate'
* Fix typo 'reletive'
* Fix typo 'Handly'
* Fix typo 'rotatated'
* Fix typo
* Fix typo 'additonal'
* Fix typos
2017-07-17 11:10:52 +01:00
Akeda Bagus
53807185a8
Fixed typos.
...
These typos are catched by `misspell` program.
```
find . -type f | grep -v assets | grep -v dummy-data | grep -v i18n | grep -v node_modules | grep -v .git | grep -v apigen | xargs misspell -w
```
Some results were excluded because of 3rd party ownership and non-english
sentences.
2017-07-10 12:56:28 +07:00
Mike Jolley
e539d3125a
Refactor shipping rate to include instance IDs
2017-07-07 14:14:29 +01:00
Brent Shepherd
1992d90d37
Revert "Merge pull request #14706 from crodas/make_get_item_consistent"
...
This reverts commit 56ffa3d2aa
, reversing
changes made to 64a60de24f
.
2017-06-27 22:28:23 -07:00
claudiulodro
4515e5fca9
Fix undefined/incorrectly used variables
2017-06-09 14:10:55 -07:00
Boro Sitnikovski
68d512ae01
Address PR comments
2017-06-08 13:00:28 +02:00
Boro Sitnikovski
0271a9e2fe
Update version
2017-06-07 16:20:09 +02:00
Boro Sitnikovski
00847da730
Fix
2017-06-07 12:33:05 +02:00
Boro Sitnikovski
1584836fa9
Code style fixes
2017-06-07 12:31:42 +02:00
Boro Sitnikovski
b5fd62274f
Map the correct function and use notice instead of exception
2017-06-07 12:30:03 +02:00
jgacuca567
4a9950b4c5
Changed their to there
2017-06-06 17:30:20 -04:00
Boro Sitnikovski
efd42e6bc4
Proof of concept to error when internal meta props are accessed directly
2017-06-06 19:13:53 +02:00
Claudio Sanches
46846ed4e0
Merge pull request #15416 from woocommerce/fix/15407
...
Correctly append cache
2017-06-02 12:18:55 -03:00
Mike Jolley
da91857a84
Correctly append cache
...
Fixes #15407
2017-06-02 13:34:09 +01:00
Cesar Rodas
c96c62f380
Improved how taxes are applied
...
If by default the taxes are based on the shipping address and the current order doesn't have any, it would use the billing address rather than using the Shopping base location.
It's basically what WooCommerce is [doing already in Javascript](https://github.com/woocommerce/woocommerce/blob/master/assets/js/admin/meta-boxes-order.js#L526-L575 ). This kind of checks should be done in the backend, never in the client side.
2017-06-01 15:51:55 -04:00
Cesar Rodas
5997ffd4b1
Fixed coding styles issues
2017-06-01 11:46:05 -04:00
David de Boer
d788b15073
Set delete_meta_data @param to accept a string
...
Set delete_meta_data @param to accept a string
2017-06-01 01:47:52 +02:00
Claudio Sanches
d9e946491f
Merge pull request #15357 from woocommerce/fix/15274-meta
...
Add ability to invalidate cache by object ID
2017-05-31 11:53:53 -03:00