Commit Graph

581 Commits

Author SHA1 Message Date
Mike Jolley 09ef555e5a [2.5] Combine update post calls 2016-02-29 12:24:02 +00:00
Mike Jolley d7d609d85a Remove comment 2016-02-25 14:13:56 +00:00
Mike Jolley dbd6479f45 Comment on get_related limit
Closes #10398
2016-02-22 13:27:39 +00:00
Mike Jolley e9703da300 Merge pull request #9921 from peterrath/vat-exempt-and-tax-enabled-handling
VAT exempt and “TAX enabled” handling in back end and Orders API
2016-02-19 14:53:39 +00:00
Peter de1ecf9f78 Use === instead of == in abstract-wc-order.php
Use === here: 	if ( 'yes' === $this->is_vat_exempt or ! wc_tax_enabled() )
2016-02-18 19:56:55 +01: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
Diego Zanella 6e4376511d Fixed incompatibility with PHP 5.4 and earlier 2016-02-10 19:47:16 +00:00
Mike Jolley fab8a871aa Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	includes/admin/class-wc-admin-assets.php
2016-02-10 14:12:39 +00:00
Mike Jolley 75c264837f Justins feedback/code tidy 2016-02-10 13:21:16 +00:00
Mike Jolley 1d5349bc83 Keep rating meta synced for filtering 2016-02-09 20:53:18 +00:00
Mike Jolley 75cbb74520 Rating widget standards 2016-02-09 15:18:27 +00:00
Mike Jolley 5525fadc09 Pass values to validation functions.
Closes #10032
2016-02-08 12:06:23 +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 384c07b367 Merge pull request #10262 from Spreeuw/issue-10252
default order to processing for non-catalog products
2016-02-05 12:21:43 +00:00
Mike Jolley 787d36dee4 Merge pull request #10232 from marcusds/master
Add filter to is_in_stock
2016-02-05 12:01:10 +00:00
Ewout Fernhout a3634028fa default order to processing for non-catalog products
fixes #10252
2016-02-03 14:48:19 +01:00
Agbonghama Collins a742861cda minor typo
Found this error while trying to understand how gateways are built on WooCommerce
2016-02-02 15:35:01 +01:00
Mike Jolley 64d4bb5172 [2.5] Round shipping after tax calc
#10076 and
https://wordpress.org/support/topic/when-calculating-shipping-total-forc
e-rounding?replies=6#post-7972623
2016-02-02 11:09:02 +00:00
Marcus 780614b14e Add filter to is_in_stock 2016-02-01 11:09:12 -08:00
Mike Jolley 657521ffa4 [2.5] Don't show purchase note to admin 2016-01-27 15:30:07 +00:00
Mike Jolley f8df682f34 Hide stock amount when children are involved
Closes #10172
2016-01-27 13:00:50 +00:00
Mike Jolley 9ca216310d [2.5] When totalling up shipping, force round
Closes #10076
2016-01-27 11:06:08 +00:00
Claudio Sanches 2790307489 Changed allbuttons to select_buttons for multiselect #10079 2016-01-21 19:33:49 -02:00
Claudio Sanches f4fddf2252 Merge pull request #10079 from woothemes/add/select-all-buttons-multiselect-field
Settings API: add optional "select all"/"select none" buttons to multiselect fields
2016-01-21 19:30:12 -02:00
Mike Jolley 4cfd8ff214 [2.5] Don't show downloads in admin email 2016-01-20 16:58:58 +00:00
Florian Ludwig ddd5f9fb9b Fixed attribute check for PHP 7 compatibility 2016-01-20 15:53:51 +01:00
Brett a772457a32 remove unnecessary use of ternary operator 2016-01-20 12:30:56 +13:00
Joey Kudish 7bb99af123 Settings API: enhance multiselect fileds
Add optional "select all"/"select none" buttons to multiselect fields,
similarly to what already exists for the country field.
2016-01-14 22:07:31 -08:00
Mike Jolley a322b05f24 Avoid confusion between fields and field keys 2016-01-11 12:04:37 +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 a33b9b9750 Unit tests for shipping zones 2016-01-08 13:56:01 +00:00
Mike Jolley 007abbc98e Shipping meta data
Closes #9094
2016-01-08 11:42:32 +00:00
Peter c5e3e018c3 is_vat_exempt and wc_tax_enabled handling in abstract-wc-order
If is_vat_exempt is 'yes', or wc_tax_enabled is false, then do not calculate tax.
2016-01-05 21:36:06 +01:00
Mike Jolley 7ece70a6ae Update _transaction_id
Closes #9970
2016-01-05 15:59:57 +00:00
Mike Jolley 97d47fb576 Move zones to main settings 2016-01-05 11:23:15 +00:00
Claudio Sanches 40d76ddc55 Merge pull request #9939 from frozzare/docs/abstract-wc-widget
Improve phpdoc comments for methods in abstract WC_Widget class
2016-01-04 12:59:32 -02:00
Fredrik Forsmo 513db93bd4 Improve phpdoc comments for methods in abstract WC_Widget class 2016-01-04 15:37:12 +01:00
Mike Jolley 62ca37f651 Merge branch 'master' into shipping-zones
# Conflicts:
#	includes/admin/class-wc-admin-assets.php
#	includes/class-wc-install.php
2016-01-04 14:35:45 +00:00
Fredrik Forsmo 39f37b1e30 Improve phpdoc comments for methods in abstract WC_Shipping_Method class 2016-01-04 15:18:14 +01:00
Fredrik Forsmo 450ae6e7fd Improve phpdoc comments and add missing param tags 2016-01-04 12:43:56 +01:00
Mike Jolley 520f1de24b Merge pull request #9932 from frozzare/wc-order-phpdoc
Fix phpdoc tags for methods in abstract WC_Order class
2016-01-04 11:08:45 +00:00
Fredrik Forsmo 9c8ef67249 Add better phpdoc comments and missing param and return value 2016-01-03 10:22:53 +01:00
Fredrik Forsmo b4a04a73ce Fix phpdoc tags for methods in abstract WC_Order class 2016-01-03 10:00:02 +01:00
Mike Jolley 4bf40cedb1 Tweak logic 2015-12-23 12:50:28 +00:00
Peter 458c755b5f Update abstract-wc-order.php
If the order has no shipping line, there must not generate an unnecessary shipping tax line with 0 value. It was happened if there is set a different tax class for shipping than tax classes of the actual product line items of the order, and the order has not got any shipping line.
The aim is to have the same tax calculation behavior if we create orders using the GUI (front end or back end), and the API.

This condition prevents to create the unnecessary tax line if there is no shipping methods of the order:

// Now calculate shipping tax
$matched_tax_rates = array();
$shipping_methods = $this->get_shipping_methods();
if ( ! empty( $shipping_methods ) ) {
	......
}


This conditional solution is similar than calc_line_taxes() in WC_AJAX class:

// Get shipping taxes
if ( isset( $items['shipping_method_id'] ) ) {
	.....
}
2015-12-21 23:42:59 +01:00
Mike Jolley 901db7b0f8 zone tweaks 2015-12-18 17:10:58 +00:00
Mike Jolley 119f19a5c1 Include and conditionally load legacy shipping methods 2015-12-18 14:24:34 +00:00
Mike Jolley 77f0e9d72a has settings handling 2015-12-18 13:12:20 +00:00
Mike Jolley bf06b6d7c3 Filter non-images from gallery
Fixes #9875
2015-12-18 11:55:51 +00:00
Mike Jolley 1a77563085 started on free shipping 2015-12-16 13:52:46 +00:00
Mike Jolley e25d876779 List and sort methods within zones 2015-12-15 17:48:03 +00:00
Mike Jolley b47423ff2b Moved rate calc logic into shipping class 2015-12-15 16:22:32 +00:00
Mike Jolley a0e0bb1e55 Load instance methods for calculations 2015-12-15 15:00:45 +00:00
Mike Jolley 091a8a7641 Zone matching functions 2015-12-15 12:39:52 +00:00
Mike Jolley 3b81642eec Instance and global level settings 2015-12-14 16:56:39 +00:00
Mike Jolley 2f97b16a91 Fix notice 2015-12-14 14:05:00 +00:00
Mike Jolley b27aed5753 Settings api 2015-12-14 14:03:46 +00:00
Mike Jolley f992f98b39 Merge branch 'pr/9790' 2015-12-14 12:48:11 +00:00
Mike Jolley 4b45812bac Only one sanitise hook is needed 2015-12-14 12:48:03 +00:00
Mike Jolley f3d6ce3c94 Round total discount to precision
Fixes #9834
2015-12-14 12:06:39 +00:00
Mike Jolley 63f8eebd6a Started on refactoring settings for instances 2015-12-11 16:41:38 +00:00
Mike Jolley 6cea054fca Method list screen and method screen with breadcrumbs 2015-12-11 14:11:12 +00:00
Shiva Poudel afd3aa2fc7 Let the additional third party widgets create and sanitize form fields 2015-12-08 16:19:49 +05:45
Claudio Sanches ff637abb7b Removed duplicated argument for PHP 7, closes #9788 2015-12-07 17:36:18 -02:00
Mike Jolley dd2fe6ff49 Make WC_Abstract_Order::update_status() return boolean
closes #9777
2015-12-07 10:12:17 +00:00
Shiva Poudel 88d7713a86 Modified checkbox class value from widefat 2015-12-05 05:26:28 +05:45
Shiva Poudel 69d6a25f5e Refactor to format the value based on widget settings type 2015-12-05 05:25:51 +05:45
Claudio Sanches d15c711855 Merge branch 'master' of github.com:woothemes/woocommerce 2015-12-04 21:17:47 -02:00
Max Rice 3befe1426f Introduce WC_Product::get_id() method 2015-12-04 15:17:25 -05:00
Claudio Sanches 92582e21cb Properly sanitize textarea field for widgets #9762 2015-12-04 17:14:42 -02:00
Shiva Poudel b3cd28e323 Added textarea widget form field 2015-12-04 21:23:19 +05:45
Mike Jolley 1c364e79e4 Enforce min and max
Closes #9761
2015-12-04 14:53:25 +00:00
Patrick Garman eb3dc97df9 Add filter to WC_Product::is_virtual() 2015-12-03 20:52:27 -05:00
Claudio Sanches 112f3bfc32 Merge pull request #9723 from shivapoudel/widget-field-class
Added support for class in each widget fields
2015-12-02 13:40:41 -02:00
Mike Jolley 350078b779 Merge branch 'pr/9708' 2015-12-02 12:42:09 +00:00
Mike Jolley 869dee2726 No need for rating HTML as we have no styling 2015-12-02 11:50:41 +00:00
Mike Jolley 328a84d278 Floatval to get rid of stray decimals 2015-12-02 11:46:51 +00:00
Shiva Poudel 2881587c44 Don't use key as default class 2015-12-02 15:47:57 +05:45
Mike Jolley 2e553cf220 Show order refunds in totals
Fixes #9589 @claudiosmweb
2015-11-30 15:25:48 +00:00
Mike Jolley b5a2c2a9d5 Unify all order email tables to use a single template
Closes #9587

@claudiosmweb @jameskoster
2015-11-30 15:16:23 +00:00
Shiva Poudel 532c1f9474 Added support for class in each widget fields 2015-11-30 12:11:29 +05:45
Claudio Sanches 753014da5a Merge pull request #9631 from woothemes/transient-tweaks
Transient tweaks
2015-11-21 22:48:14 -02:00
Illimar Tambek d91dfb6fe6 Introduce woocommerce_recorded_sales action hook 2015-11-19 18:07:04 +02:00
Claudio Sanches d931405156 Fixed the type returned when get_stock_quantity() is empty
Since expect return an integer value, we can't return an empty string.
This can generate some kinds of errors like:

 '' >= 1 returns false
 '' >= -1 returns true

This can be a problem comparing stock quantity like we do in
WC_Product::has_enough_stock()

But using null we have:

 null >= 1 returns false
 null >= -1 returns false

cc @mikejolley

ref #9598
2015-11-14 15:53:36 -02:00
Mike Jolley b59ec6de76 Move var definition to abstract 2015-11-14 16:39:53 +00:00
Mike Jolley 3a096b3b64 Remove transient from get_total_stock and combine into abstract
Grouped and variable methods were identical. Caching benefit comes from
get_children
2015-11-14 16:34:47 +00:00
Mike Jolley 851fc2a442 Use get_cache_prefix in orders class 2015-11-13 23:11:05 +00:00
Mike Jolley 3082c5bba6 wc_related_ and get_related method tweaks
Remove use of multiple expiring transients. See function docblock for
explanation.
2015-11-13 21:14:42 +00:00
Mike Jolley 3ceed757bd Store rating and reviews in postmeta rather than transients
These don’t change often, and as long as we listen for comment count
update events will be kept in sync.
2015-11-13 20:41:20 +00:00
Shiva Poudel d31859ab6c Remove unused variable declaration 2015-11-10 16:53:45 +05:45
Mike Jolley 4e5baf23aa Cache get_item_meta_array for better performance
Closes #8810 @claudiosmweb
2015-11-05 15:21:28 +00:00
Shiva Poudel d9e8057df3 Tweak the dockblocks and periodic-ending fix 2015-11-04 00:05:08 +05:45
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches efa19f799d Fixed some coding standards for docblocks 2015-11-03 10:28:01 -02:00
Mike Jolley aec0e0e327 supports() method which mirrors gateways
Closes #9471
2015-11-02 11:23:50 +00:00
Kathy Darling 856d192bff Use generic `ajax_add_to_cart` class for adding items in the loop to the cart via ajax. 2015-10-30 12:54:49 -05:00
Mike Jolley 5b6e16682c Handle partial/full refund for orders containing free items
Also adds helper method to determine if such as free item exists or
not. Closes #9460
2015-10-29 15:34:33 +00:00
Ari-Pekka Koponen 11ab216993 WC_Product __get should check for False instead of empty 2015-10-28 12:45:54 +02:00
Claudio Sanches b85ae9056c Rename wc_add_help_tip() function to wc_help_tip() 2015-10-23 13:09:08 -02:00
Claudio Sanches 2e95a68357 Use new "question" mark icon font
Created wc_add_help_tip() function to generate the icons
Replaced all .help_tip elements and [?]

We'll keep the old image and styles in order to maintain backwards
compatibility

Closes #9381
2015-10-23 01:40:52 -02:00