Commit Graph

6323 Commits

Author SHA1 Message Date
Mike Jolley 8237ed288d Merge pull request #10063 from woothemes/update/normalization-functions-from-unit
Weight/dimension conversions
2016-01-14 08:24:21 +00:00
Nicola Mustone 9499d561d3 add WP_CRON to the system status 2016-01-14 08:01:22 +01:00
Mike Jolley 3e85a61e96 Merge pull request #10065 from aelia-co/improved_shipping_cost_args_filter
Added shipping class instance to woocommerce_evaluate_shipping_cost_args
2016-01-13 15:08:36 +00:00
Mike Jolley 35e45e6075 Make price function clearer
@tamarazuk @franticpsyx @daigo75 Hopefully this makes it clearer which
values are returned and when the filter is ran.
2016-01-13 15:07:47 +00:00
Diego Zanella 35d20f61a8 Added shipping class instance to woocommerce_evaluate_shipping_cost_args
The instance is going to be useful if any 3rd party needs to read any other property of the shipping class, which might not have been passed through the $args variable.
2016-01-13 13:35:24 +00:00
Mike Jolley 37003b2370 Round get_remaining_refund_amount
Fixes #10060
2016-01-13 11:07:05 +00:00
Mike Jolley 133e7686b5 Stop canonical redirect breaking front page endpoints
Fixes #10062
2016-01-13 11:01:08 +00:00
Mike Jolley 0d569948fd spacing 2016-01-13 10:33:07 +00:00
Joey Kudish ece376bac1 weight/dim normalization: allow custom from unit
Add a third optional parameter to the weight and dimension normalization
functions in order to be able to specify a specific "from unit" instead
of using the site option. This allows arbitrary conversions between
different units of measure; which is particularly useful for extensions
that need to perform arbitrary unit conversions (e.g. shipping extension
that specifies custom box formats).

Also includes updated tests.
2016-01-12 22:48:56 -08:00
Claudio Sanches 636e2389aa Changed … to … 2016-01-12 14:03:01 -02:00
Mike Jolley 70a9eb3807 Fix pagination + sorting on tax screen
@claudiosmweb
2016-01-12 12:01:10 +00:00
Mike Jolley e15c123510 Fix - Missing validation rule for product cat exclusion coupons (validate_excluded_product_categories)
Fixes #10058
2016-01-12 09:49:46 +00:00
Jon Koops 7e750716e3 Added autocomplete attributes for checkout fields
This allows browsers to automatically fill in the appropriate fields
for the checkout process. This should significantly improve the
checkout experience for a lot of users, especially those that
frequently shop online in different shops.

The following fields now have proper autocomplete attributes:
 - First name
 - Last name
 - Company name
 - County
 - Address line 1 (Street name)
 - Address line 2 (Apartment, suite, unit etc.)
 - City
 - State / Country
 - Postcode / ZIP
 - Email address
 - Phone number

For more information about how autocomplete can improve user
experience: https://developers.google.com/web/updates/2015/06/checkout-faster-with-a
utofill
A complete overview can be found in the WHATWGHTML specification: https://html.spec.whatwg.org/multipage/forms.html#autofill
2016-01-11 22:55:38 +01:00
Jon Koops 8f63668e16 Added autocomplete parameter to the woocommerce_form_field function
This makes it possible to add an autocomplete attribute to a variety of
WooCommerce form fields. Making it easier for plugin developers and
core developers to build forms with good autocomplete UX.

More information about the autocomplete attribute and it’s values see:
https://html.spec.whatwg.org/multipage/forms.html#autofill-field
2016-01-11 22:55:38 +01:00
Mike Jolley 934269f1e8 woocommerce_evaluate_shipping_cost_args 2016-01-11 15:51:37 +00:00
Diego Zanella eb42c7b3e3 Added new woocommerce_evaluate_shipping_cost filter
* The filter will allow 3rd parties to pre-process the arguments used to evaluate a shipping cost formula.
2016-01-11 13:51:46 +00:00
Mike Jolley 3938a43b44 Error handling when order cannot be retrieved.
Also renumbers error codes @claudiosmweb since 4xx usually reflects
client errors and may be misleading

Closes #10047
2016-01-11 10:47:10 +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
Mike Jolley 2714ec0aeb Keep cookie/session alive after order.
@claudiosmweb this ok with you?

Closes #10045
2016-01-11 10:28:38 +00:00
Florian Ludwig d059ce6bc9 Fixed php notices for incorrect input format in date function if date is not set in db 2016-01-11 11:27:55 +01:00
Keijo Hyttinen 72f2f4a327 backorders needs identity check due to boolean values 2016-01-10 00:59:54 +02:00
Florian Ludwig f41a0a539f Fixed format of date after reading from DB 2016-01-08 13:34:19 +01:00
Mike Jolley 71a6fcc0e2 Note should be in customer details table
Fixes #10037
2016-01-08 12:16:55 +00:00
Mike Jolley ad11042afd [2.4] Don't unforce SSL on secure blogs
@claudiosmweb can you check this and cherry pick if good to go?

Fixes #10029
2016-01-08 11:27:18 +00:00
Florian Ludwig 734f3aed18 Eliminated duplicate price save code in api v2 and api v3
I think we shouldn’t coyp&paste too much code from core into the api so
I eliminated the duplicate code and made use of the already existing
_wc_save_product_price function for products and variations
2016-01-07 23:52:01 +01:00
Mike Jolley 64ceafd3f5 Merge pull request #10023 from shivapoudel/selected
Use selected instead of checked for currency code in setup wizard
2016-01-07 11:25:45 +00:00
Mike Jolley 3c5520d18c Add filter on default location array
Closes #10017
2016-01-07 11:25:24 +00:00
Shiva Poudel 45dd6890c7 Use selected instead of checked for currency code in setup wizard 2016-01-07 16:58:53 +05:45
Mike Jolley 30b3214697 Merge pull request #10019 from thenbrent/fix_unknown_column
Fix Unknown column '_customer_user' notice when deleting a user
2016-01-07 10:51:08 +00:00
Mike Jolley c5c709ed62 Merge pull request #10012 from frozzare/docs/admin-walkers
Improve docblock comments Walker classes
2016-01-07 10:46:26 +00:00
Mike Jolley 6de9edd2c7 Merge pull request #10015 from frozzare/docs/class-wc-widgets
Improve docblock comments WC_Widget classes
2016-01-07 10:42:18 +00:00
Mike Jolley 46481a49f7 Merge pull request #10014 from frozzare/docs/local-delivery
Improve docblock comments in WC_Shipping_Local_Delivery class
2016-01-07 10:42:04 +00:00
Mike Jolley aeddd6b1a0 Merge pull request #10011 from frozzare/docs/flat-rate-shipping
Improve docblock comments in WC_Shipping_Flat_Rate classes
2016-01-07 10:41:47 +00:00
Mike Jolley ce9ac48866 Merge pull request #10010 from frozzare/docs/free-shipping
Improve docblock comments for free shipping classes
2016-01-07 10:41:07 +00:00
Mike Jolley 17db4f31ed Merge pull request #10009 from frozzare/docs/local-pickup
Improve docblock comments in WC_Shipping_Local_Pickup
2016-01-07 10:40:44 +00:00
Mike Jolley 7f21d4f443 Merge pull request #10008 from frozzare/docs/international-delivery
Improve docblock comments WC_Shipping_International_Delivery class
2016-01-07 10:40:37 +00:00
Caleb Burks e612dc4561 Check for a valid product ID/SKU 2016-01-07 04:07:02 -05:00
Brent Shepherd 6d2b570f30 Fix Unknown column '_customer_user' notice
When deleting a user. Also ensures the customer value on orders is set
correctly to a guest user (0).
2016-01-06 17:53:21 -08:00
Fredrik Forsmo 7570ac414f Improve docblock comments in WC_Shipping_Local_Pickup
* Added comments to `init`, `calculate_shipping`, `clean` and
`init_form_fields`
2016-01-06 20:15:45 +01:00
Fredrik Forsmo 1288c18301 Improve docblock comments in WC_Shipping_Local_Delivery class
* Added comment to`calculate_shipping` and `init`
2016-01-06 20:13:44 +01:00
Fredrik Forsmo 0d2c6be073 Improve docblock comments WC_Shipping_International_Delivery class
* Added comment to `is_available`
* Fixed initialize typo
2016-01-06 20:12:02 +01:00
Fredrik Forsmo 093684c7e0 * Added comments to `init`, `is_available` and `calculate_shipping`
* Added better properties comments.
* Fixed initialize typo
2016-01-06 20:10:54 +01:00
Fredrik Forsmo efdd927e36 Improve docblock comments in WC_Shipping_Flat_Rate classes 2016-01-06 20:08:43 +01:00
Fredrik Forsmo 3e41546cef Improve docblock comments Walker classes
* Added comments to properties that don’t have any.
* Added comments to methods.
* Made `$db_fields` more readable
2016-01-06 20:02:05 +01:00
Fredrik Forsmo bc9019458c Improve docblock comments WC_Widget classes
* Added better comment to `widget`, `form` and `update` methods.
2016-01-06 19:58:38 +01:00
Claudio Sanches fcb4dc79cb Merge pull request #10005 from frozzare/docs/various-functions
Improve docblock comments in various functions
2016-01-06 15:00:42 -02:00
Fredrik Forsmo 676525c2b7 Improve docblock comments in various functions
* Added missing param tags to functions
* Added comments to `wc_get_attachment_image_attributes` and
`wc_prepare_attachment_for_js`
* Fixed return type value for functions where it says bool but the code
returns array
* Renamed boolean to bool
2016-01-06 17:11:09 +01:00
Claudio Sanches 7d6ff7a7c9 Merge pull request #10004 from frozzare/docs/various-wc-classes
Improve docblock comments in various WC_* classes
2016-01-06 13:49:40 -02:00
Claudio Sanches de30284d2a Merge pull request #10003 from frozzare/docs/class-wc-shipping
Improve docblock comments in various WP_Shipping classes
2016-01-06 13:49:15 -02:00
Claudio Sanches 6b7de2b8d2 Merge pull request #10002 from frozzare/docs/class-wc-api
Improve docblock comments in WC_API class
2016-01-06 13:49:07 -02:00
Claudio Sanches 06c1ce176b Merge pull request #10001 from frozzare/docs/class-wc-auth
Improve docblock comments in WC_Auth class
2016-01-06 13:48:52 -02:00
Claudio Sanches 8224303e59 Merge pull request #10000 from frozzare/docs/class-wc-cart
Improve docblock comments in WC_Cart class
2016-01-06 13:48:35 -02:00
Claudio Sanches 66e41b9048 Merge pull request #9999 from frozzare/docs/class-wc-comments
Improve docblock comments WC_Comments
2016-01-06 13:48:23 -02:00
Claudio Sanches 62c195b238 Merge pull request #9998 from frozzare/docs/class-wc-countries
Improve docblock comments WC_Countries class
2016-01-06 13:48:18 -02:00
Claudio Sanches 186c0a635c Merge pull request #9997 from frozzare/docs/class-wc-coupon
Improve docblock comments in WC_Coupon class
2016-01-06 13:48:14 -02:00
Claudio Sanches 9fec69af7c Merge pull request #9996 from frozzare/docs/class-wc-customer
Improve docblock comments WC_Customer class
2016-01-06 13:48:10 -02:00
Claudio Sanches ae0a604492 Merge pull request #9995 from frozzare/docs/class-wc-geo-ip
Improve docblock comments in WC_Geo_IP class
2016-01-06 13:48:05 -02:00
Claudio Sanches 560ed7d202 Merge pull request #9994 from frozzare/docs/class-wc-product-external
Improve docblock comments in WC_Product_External
2016-01-06 13:48:02 -02:00
Claudio Sanches bd6d741244 Merge pull request #9993 from frozzare/docs/class-wc-products
Improve docblock comments in various WC_Product classes
2016-01-06 13:47:55 -02:00
Fredrik Forsmo bb19615029 Improve docblock comments in various WC_* classes
* Added comments to various methods
* Fixed various properties comments and param types
2016-01-06 16:24:47 +01:00
Fredrik Forsmo 65d610883f Improve docblock comments in various WP_Shipping classes
* Added comments to various methods
* Removed `method function` from some comments
2016-01-06 16:19:11 +01:00
Fredrik Forsmo 31cb32dc36 Improve docblock comments in WC_Query class
* Added comments to `add_query_vars`, `search_post_excerpt`,
`wpseo_metadesc`,  `wpseo_metakey` and `order_by_rating_post_clauses`
2016-01-06 16:17:26 +01:00
Fredrik Forsmo f1920cb882 Improve docblock comments in various WC_Product classes
* Added comments to methods that was `method function`
2016-01-06 16:15:00 +01:00
Fredrik Forsmo 9014604514 Improve docblock comments in WC_Product_External
* Added comments to `_construct`, `get_product_url` and
`get_button_text`
2016-01-06 16:11:50 +01:00
Fredrik Forsmo 890e117530 Improve docblock comments in WC_Geo_IP class
* Added comments to properties that don’t have any.
2016-01-06 16:07:58 +01:00
Fredrik Forsmo a0ae6dfbe2 Improve docblock comments WC_Customer class
* Added comment to `has_calculated_shipping`, `get_taxable_address`
and `calculated_shipping`
2016-01-06 15:56:25 +01:00
Fredrik Forsmo 0f74f805b0 Improve docblock comments in WC_Coupon class
* Added missing throws tags to various methods
2016-01-06 15:53:59 +01:00
Fredrik Forsmo 0f0d40ceff Improve docblock comments WC_Countries class
* Added comment to `get_allowed_country_states` and
`get_shipping_country_states`
* Added missing param tags to `country_dropdown_options`
* Fixed param tag for `trim_formatted_address_line`
2016-01-06 15:51:58 +01:00
Fredrik Forsmo 9a9aaff342 Improve docblock comments WC_Comments
* Added missing param tags to `comment_moderation_recipients`
2016-01-06 15:49:24 +01: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
Fredrik Forsmo 3c722ea813 Improve docblock comments in WC_Auth class
* Added missing var tag to `VERSION` const
* Added missing param type to `add_query_vars`
2016-01-06 15:37:44 +01:00
Fredrik Forsmo 809e0a382b Improve docblock comments in WC_API class
* Added type to missing property comment
* Added missing type to param tag for `add_query_vars`
* Added better comments for properties
2016-01-06 15:35:35 +01:00
Claudio Sanches 870ecfea11 Merge pull request #9991 from frozzare/docs/class-wc-simplify-commerce
Improve docblock comments in Simplify Commerce classes
2016-01-06 11:30:49 -02:00
Claudio Sanches a1871e288c Merge pull request #9990 from frozzare/docs/class-wc-gateway-paypal
Improve docblock comments in WC_Gateway_Paypal classes
2016-01-06 11:30:37 -02:00
Claudio Sanches 5e8764630d Merge pull request #9989 from frozzare/docs/class-wc-gateway-bacs
Improve docblock comments in WC_Gateway_BACS
2016-01-06 11:30:22 -02:00
Mike Jolley 918b84ee3a Strip tags from subject
#9706
2016-01-06 12:38:22 +00:00
Mike Jolley 5bae221b33 Merge pull request #9973 from frozzare/docs/class-wc-email-new-order
Improve docblock comments in WC_Email_New_Order class
2016-01-06 12:25:44 +00:00
Mike Jolley 0b82d67d4c Merge pull request #9974 from frozzare/docs/class-wc-email-failed-order
Improve docblock comments in WC_Email_Failed_Order class
2016-01-06 12:25:38 +00:00
Mike Jolley dc67ec8b07 Merge pull request #9975 from frozzare/docs/class-wc-email-customer-reset-password
Improve docblock comments in WC_Email_Customer_Reset_Password class
2016-01-06 12:25:33 +00:00
Mike Jolley a583b5aa27 Merge pull request #9976 from frozzare/docs/class-wc-email-customer-refunded-order
Improve docblock comments in WC_Email_Customer_Refunded_Order class
2016-01-06 12:25:23 +00:00
Mike Jolley 81cfc5030f Merge pull request #9977 from frozzare/docs/class-wc-email-customer-processing-order
Improve docblock comments in WC_Email_Customer_Processing_Order class
2016-01-06 12:25:13 +00:00
Mike Jolley 867c807fc3 Merge pull request #9978 from frozzare/docs/class-wc-email-customer-invoice
Improve docblock comments in WC_Email_Customer_Invoice class
2016-01-06 12:25:07 +00:00
Mike Jolley 031700b649 Merge pull request #9979 from frozzare/docs/class-wc-email-cancelled-order
Improve docblock comments in WC_Email_Cancelled_Order class
2016-01-06 12:24:59 +00:00
Mike Jolley 0beb86c790 Merge pull request #9980 from frozzare/docs/class-wc-email-customer-completed-order
Improve docblock comments in WC_Email_Customer_Completed_Order class
2016-01-06 12:24:52 +00:00
Mike Jolley 42c2b1d7e9 Merge pull request #9981 from frozzare/docs/class-wc-email-customer-new-account
Improve docblock comments in WC_Email_Customer_New_Account
2016-01-06 12:24:41 +00:00
Mike Jolley a23dd4ab0a Merge pull request #9972 from frozzare/docs/class-wc-email
Improve docblock comments in WC_Email class
2016-01-06 12:24:27 +00:00
Mike Jolley dd3facbe2f Merge pull request #9982 from frozzare/docs/class-wc-email-customer-note
Improve docblock comments in WC_Email_Customer_Note class
2016-01-06 12:24:00 +00:00
Mike Jolley ea84096b69 Remove inconsistent usage of placeholders
State field has no placeholder, yet some fields had a duplicate of the
label. This removes those placeholders so all fields remain consistent.
cc @claudiosmweb @jameskoster Also removes commented out code.
2016-01-06 12:22:01 +00:00
Mike Jolley 0b6fdf5fe8 Use data-placeholder for selects since placeholder is not to W3C spec
Closes #9986
2016-01-06 12:20:06 +00:00
Fredrik Forsmo 2bee73f031 Improve docblock comments in Simplify Commerce classes
* Added comment to `get_icon` method
* Added missing return tag to `is_available` method
* Fix return type typo `wp_error => WP_Error`
* Renamed integer to int
2016-01-05 20:27:24 +01:00
Fredrik Forsmo 9ae4f4e7ab Improve docblock comments in WC_Gateway_Paypal classes
* Added comments to `get_icon` method
* Added missing param tags to various methods.
* Renamed integer to int
* Renamed boolean to bool
2016-01-05 20:19:12 +01:00
Fredrik Forsmo 60b27d4168 Improve docblock comments in WC_Gateway_BACS
* Added comment to `generate_account_details_html`
* Added missing param tags to `thankyou_page` and `bank_details`
* Removed new line after docblock before `get_country_locale`
2016-01-05 20:02:31 +01:00
Fredrik Forsmo e06d8a2a2f Improve docblock comments in WC_Email class
* Added comments to `handle_multipart`, `format_string`, `get_subject`,
`get_heading`, `get_headers`, `get_attachments`, `get_content_type`,
`get_blogname` and `get_content`
2016-01-05 19:42:18 +01:00
Fredrik Forsmo 12c4e48256 Improve docblock comments in WC_Email_New_Order class
* Added comments to `get_content_plain` and `get_content_html`
* Added missing param tag to `trigger`
2016-01-05 19:38:19 +01:00
Fredrik Forsmo 6a73721611 Improve docblock comments in WC_Email_Failed_Order class
* Added comments to `get_content_html`
* Added missing param tag to `trigger`
2016-01-05 19:37:34 +01:00
Fredrik Forsmo c60f327e5f Improve docblock comments in WC_Email_Customer_Reset_Password class
* Added better comments to properties.
* Added comments to `get_content_plain` and `get_content_html`
* Added missing param tag to `trigger`
2016-01-05 19:36:44 +01:00
Fredrik Forsmo 5d22c324fa Improve docblock comments in WC_Email_Customer_Refunded_Order class
* Added comments to `set_email_strings`, `trigger_full`,
`trigger_partial`, `get_subject`, `get_heading` and `get_content_html`
* Added missing param tag to `trigger`
2016-01-05 19:33:49 +01:00
Fredrik Forsmo e4ec2171e2 Improve docblock comments in WC_Email_Customer_Processing_Order class
* Added comments to `get_content_plain` and `get_content_html`
* Added missing param tag to `trigger`
2016-01-05 19:29:45 +01:00
Fredrik Forsmo 19b049b28b Improve docblock comments in WC_Email_Customer_Note class
* Added comments to properties that don’t have any.
* Added comments to `get_content_plain` and `get_content_html`
* Added missing param tag to `trigger`
2016-01-05 19:28:45 +01:00
Fredrik Forsmo 9f1376185f Improve docblock comments in WC_Email_Customer_New_Account
* Added comments to properties that don’t have any.
* Added comments to `get_content_plain` and `get_content_html`
* Added missing param tags to `trigger`
2016-01-05 19:27:27 +01:00