Commit Graph

518 Commits

Author SHA1 Message Date
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
Mike Jolley 4dbfe1551c Settings API - don't save title fields
Closes #9401
2015-10-22 11:27:39 +01:00
Mike Jolley dda0f0c2bd Check for existence of global attribute when you get_attributes() for a product
Fixes #9141
2015-10-08 13:55:01 +01:00
Mike Jolley 1ec3cb0ef6 [2.4] Default value should not apply if value of option is 0
Fixes #9270 @claudiosmweb
2015-10-05 15:07:46 +01:00
Mike Jolley 42d90594af Fix password with & saving
@claudiosmweb
2015-10-05 14:09:11 +01:00
Mike Jolley d4fbe0e45c Use SKU for stock order notes
Fixes #9133
2015-10-01 18:13:37 +02:00
Claudio Sanches 1522a4d87b Added download-url class in WC_Abstract_Order::display_item_downloads(), closes #9158 2015-09-21 18:28:03 -03:00
Mike Jolley 0c56fe0844 Merge pull request #9149 from JeroenSormani/stock-changes
Add get_stock_quantity filter
2015-09-17 10:57:47 +01:00
JeroenSormani cb75a1e8af Add get_stock_quantity filter 2015-09-17 10:19:04 +02:00
Mike Jolley 83838358fe Revert "Merge pull request #8768 from SiR-DanieL/session-delete"
This reverts commit f63c500848, reversing
changes made to 2a31d1fe98.
2015-09-16 13:38:28 +01:00
Mike Jolley f63c500848 Merge pull request #8768 from SiR-DanieL/session-delete
Instroducing WC_Session::delete
2015-09-16 10:34:51 +01:00
Nicola Mustone 7d6bf488c9 using unset also in the magic method 2015-09-16 11:34:22 +02:00
Nicola Mustone 6bc17c65c8 delete to unset 2015-09-16 11:34:03 +02:00
Claudio Sanches f7d035e739 Merge pull request #9084 from rchq/patch-1
Added an action for notifications
2015-09-15 19:59:16 -03: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 9f1a5e3c26 Remove unused arg 2015-09-15 12:51:45 +01:00
Mike Jolley 0164584aaf Reduce stock once and record in _order_stock_reduced meta
Also clears up the payment_complete method
2015-09-15 12:39:16 +01:00
rchq 332c1bdf9c Update abstract-wc-order.php
Created an action to be able to hook into and add additional notification triggers.
2015-09-08 11:00:22 -07:00
Mike Jolley 358f3f79fa Don't use extract() in add_rate
#9057
2015-09-07 16:02:23 +01:00
James Koster 8eebc7c900 Free is an amount!
All product prices are wrapped in `span class=“amount”`. To make
themers lives easier let’s be consistent. When the product is free the
price should still be wrapped.
2015-09-04 11:19:52 +01:00
Mike Jolley d90d562b42 Leave excl function alone 2015-09-04 10:57:22 +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 fad48bf800 Add filters to control shipped via text 2015-09-03 15:05:10 +01:00
Mike Jolley fdb25fa0c3 Pass through tax_display
Fixes #8951
2015-08-26 13:05:52 +01:00
Mike Jolley 57bb0ebe25 Record manual order status change 2015-08-18 16:33:38 +01:00
Mike Jolley 1999dbe92d Improve display_item_downloads numbering and use same function in emails. 2015-08-17 12:17:56 +01:00
Mike Jolley 63fe4a0c05 Correct docbloc Closes #8814 2015-08-13 18:05:55 +01:00
Nicola Mustone 1017798c6c instroducing WC_Session::delete 2015-08-11 10:11:36 +02:00
Brent Shepherd a826330ad0 Reinstate default value for $items
That was (accidentally?) removed with SHA: 877e39064

Fixes "PHP Notice:  Undefined variable: items" when attempting to get
line items of a type that does not exist on the order, like coupons.
2015-08-07 12:12:08 -07:00
Mike Jolley 877e390646 Remove $type from prepare 2015-08-07 14:06:19 +01:00
Mike Jolley 4c8ef3ff33 Use esc_sql on item type instead of esc_attr 2015-08-07 11:37:19 +01:00
George Stephanis c938fa24da More missing esc_attr calls, :( 2015-08-05 15:17:52 -04:00
Mike Jolley 7f3c2a78c5 Get total functions should respect rounding settings.
Closes #8707
2015-08-05 14:33:53 +01:00
Mike Jolley afd0e9edd4 Pass $this to filters
#8722
2015-08-05 13:49:27 +01:00
Nicola Mustone 9822edda0b better naming 2015-08-05 13:54:20 +02:00
Nicola Mustone 9140ca0f76 added cross and up sells IDs filters 2015-08-05 11:01:47 +02:00
Mike Jolley d6bd46c55d Move expand_item_meta to own method
Fixes notices in some extensions (deposits)
2015-08-03 13:21:44 +01:00
Mike Jolley ef798921aa woocommerce_can_reduce_order_stock filter
Needed for extension (deposits)
2015-08-03 10:37:58 +01:00
Mike Jolley 7b2aec4791 Take item qty into consideration when refunding orders
Fixes #8675
2015-07-29 13:13:41 +01:00
Mike Jolley eb19532165 Show 'fee' label is empty 2015-07-28 11:32:53 +01:00
Mike Jolley 794af1c013 When the stock level is changed via update_post_meta ensure the stock_status is kept in sync
Closes #8605
2015-07-27 19:04:08 +01:00
Claudio Sanches c95988bc8a Improve password sanitization in WC_Settings_API, closes #8627
@mikejolley
2015-07-21 18:37:12 -03:00
Claudio Sanches 9e41552342 Removed all "@return void" 2015-07-16 16:55:48 -03:00
Mike Jolley 7285ce74e6 Tax display notice 2015-07-16 10:15:45 +01:00
Mike Jolley f42fa85eab Variation tax status should always come from parent 2015-07-15 19:12:12 +01:00
Mike Jolley db473cc369 Move refund logic into main order class.
These methods are not defined in the abstract.
2015-07-15 16:02:26 +01:00
Mike Jolley 506b5ef3f6 Set total after update_shipping
Based on add_shipping code Closes #8475
2015-07-09 16:48:34 +01:00
Vignesh 91faacb4c9 Return the output directly
Return the output directly instead of variable.
2015-07-09 13:39:29 +05:30
Claudio Sanches 89cef9ff02 Introduces methods to WC_Abstract_Order for get customer full name
New methods:

WC_Abstract_Order::get_formatted_billing_full_name()
WC_Abstract_Order::get_formatted_shipping_full_name()

closes #8535

cc: @mikejolley
2015-07-08 18:00:19 -03:00
Mike Jolley dc00921ced Merge pull request #8486 from justinshreve/get-price-suffix-price-param
Add $price and $qty parameters to get_price_suffix
2015-06-30 12:59:43 +02:00
Justin Shreve eb85cd1682 Add $price and $qty to get_price_suffix so custom values can be passed into get_price_including_tax and get_price_excluding_tax 2015-06-29 19:24:48 +00:00
Justin Sainton 4d5d018a34 Deprecate PHP4 constructor usage in widgets. This is deprecated in upcoming PHP versions. 2015-06-29 11:46:03 -07:00
Gregory Karpinsky 9094bb0662 Do not FATAL on $product->has_file 2015-06-29 09:08:16 -04:00
Mike Jolley 71f2c25da4 Calc totals should not calc tax if disabled 2015-06-23 13:29:38 +01:00
Mike Jolley e08e123988 Note version since 2015-06-19 13:43:18 +01:00
Gabor Javorszky 1dfb27f928 Adds WC_Abstract_Order->get_address
Adds a function to retrieve order address in non-localized, raw, non-formatted way.
2015-06-19 01:43:31 +01:00
Justin Shreve 133b9ce969 Implement the new color picker + preview for integrations as well. 2015-06-11 14:40:06 +00:00
Mike Jolley bb4c303c39 get_type has no args 2015-06-08 12:22:26 +01:00
Mike Jolley 3c87e39ce6 Product get_type() method 2015-06-08 12:20:39 +01:00
Mike Jolley 60dd4474db abstract email class should not exist ! legacy 2015-06-01 10:48:13 -03:00
Mike Jolley ed99be9aed Sanitize tooltips with htmlspecialchars and remove esc_attr usage
Part of #4
2015-06-01 13:36:03 +01:00
Claudio Sanches 51c8bbf87c wrong nonce verification 2015-06-01 13:33:51 +01:00
Nathan Dawson e535e005b7 Add a filter to override needs_shipping_address order method.
If an order doesn't have any shipping methods it's not possible to set needs_shipping_address to true. When 'woocommerce_cart_needs_shipping_address' is set to true the address needs to be shown on the front end and in confirmation emails.
2015-05-28 15:48:37 +01:00