Commit Graph

4787 Commits

Author SHA1 Message Date
Alexander Concha f194330aeb Escape properly echoed values
The variables $base_slug/$structures may contain unsafe values due to
the use of urldecode. For example if the post slug is '%22%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3E'
2015-06-01 12:59:03 +01:00
Alexander Concha f38bc86c5d Escape properly the metadata to be copied.
Fixes a SQL injection because the meta key can contain arbitrary values.
2015-06-01 12:58:56 +01:00
Alexander Concha 3c1b14d00d Escape properly the provided array of post codes
The callers only run wc_clean/esc_attr on the provided values which are
not functions meant to protect against SQL injections.
2015-06-01 12:58:51 +01:00
Ben Bidner 7d8db595f2 Fixes an (admin) SQLi when setting stock levels for product variations 2015-06-01 12:58:38 +01:00
Alexander Concha 7896b49684 fclose requires a resource, not a string. 2015-06-01 12:58:06 +01:00
Ben Bidner 2740db17c0 Merge conflict - esc customer data 2015-06-01 12:57:48 +01:00
Ben Bidner f46060a0dd Remove call to `wp_specialchars_decode()` in `wc_get_price_thousand_separator()` and `wc_get_price_decimal_separator()`.
Closes #6
2015-06-01 12:54:23 +01:00
Ben Bidner f3e3b5c209 add `$args` arguments to `WC_Product_Factory->get_product_class()` to allow `$product_type` to be overwritten by `$args['product_type']` 2015-06-01 12:54:18 +01:00
Ben Bidner 7b9a22208e readds the `$the_product` global variable 2015-06-01 12:54:14 +01:00
Ben Bidner f066a7bb21 pass correct number of arguments to `wc_lostpassword_url()`, `wc_nav_menu_items()`, `wc_nav_menu_item_classes()`, and `wc_change_term_counts()` 2015-06-01 12:53:51 +01:00
Ben Bidner 32e37b57d0 fixes too many arguments in function or method call: WC_Shortcode_My_Account::add_payment_method($wp->query_vars['add-payment-method']) 2015-06-01 12:52:10 +01:00
Ben Bidner 1aa020ca57 fixes undefined constant ('error_code' > '$error' typo) 2015-06-01 12:52:01 +01:00
Ben Bidner 5e22e13975 set default currency position format string (in case of missing or invalid `woocommerce_currency_pos` option value) 2015-06-01 12:51:56 +01:00
Mike Jolley 3d049ff379 [2.3] Clear expired transients on update 2015-06-01 11:39:03 +01:00
Mike Jolley 1ce272b385 [2.3] Tweak transient clear SQL 2015-06-01 11:38:43 +01:00
Mike Jolley b9708c4df9 Show refunded total shipping and taxes
Closes #8222
2015-06-01 11:06:11 +01:00
Mike Jolley bd7624e5b7 Check template code isset 2015-05-29 17:40:53 +01:00
Mike Jolley 1e3fcd0e6d [2.3] Avoid initialising classes when saving 2015-05-29 17:38:25 +01:00
Mike Jolley 803f4a9e85 [2.3] Delete correct transient when linking variations
Closes #8241
2015-05-29 15:34:27 +01:00
Mike Jolley 3222d1473e Merge pull request #8242 from n-dawson/master
Add a filter to override needs_shipping_address order method.
2015-05-29 15:28:49 +01:00
Mike Jolley a7a290e12a Merge pull request #8250 from kilbot/patch-1
Add capability_type to product_variation
2015-05-29 15:27:41 +01:00
Mike Jolley 0a3defd798 Move tax enabled check 2015-05-29 14:55:57 +01:00
Claudio Sanches b2711f3d64 [API] Fixed products tags in write-mode 2015-05-29 10:05:15 -03:00
Claudio Sanches 88003436a6 [API] Add properly sanitization for categories and tags in products endpoint, closes #8251 2015-05-29 10:04:02 -03:00
Claudio Sanches e6ae10ee9a Test 2015-05-29 10:01:43 -03:00
Paul Kilmurray b16d443709 fix missing comma 2015-05-29 19:35:31 +08:00
Paul Kilmurray b158d517e9 Add capability_type to product_variation
By default the product_variation has `capability_type = 'post'` which means that users need `edit_post` capability to edit. This change will make variation capabilities consistent with products, ie: `edit_product`
2015-05-29 17:42:33 +08:00
roykho b9eefa58fa use esc_textarea function 2015-05-28 16:08:22 -07:00
roykho 54b0a0ca54 changed dynamic variation description to allow limited HTML and some sanitized tweaks 2015-05-28 14:31:45 -07:00
Mike Jolley e51eae80c6 Merge pull request #8167 from roykho/dynamic-variation-description
Dynamic variation description
2015-05-28 15:53:03 +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
Mike Jolley 4e5091adda Merge remote-tracking branch 'origin/master' 2015-05-28 14:42:45 +01:00
Mike Jolley 5cac639cff Merge branch 'improve-refund-reporting' Closes #8028
Conflicts:
	includes/admin/reports/class-wc-report-sales-by-date.php
	includes/updates/woocommerce-update-2.4.php
2015-05-28 14:41:20 +01:00
Claudio Sanches 903cb817f0 Fixed WC_Install::get_schema for woocommerce_api_keys table 2015-05-28 10:36:25 -03:00
Mike Jolley 5ef335b169 Merge pull request #8215 from JeroenSormani/order-tests
Order tests
2015-05-28 12:44:17 +01:00
Mike Jolley b77755af5c Merge pull request #8236 from n-dawson/master
[2.3] Resolve blank shipping information bug. Fixes #8235
2015-05-28 12:21:38 +01:00
Mike Jolley 4a9971193f Only track product views when widget is active
Closes #8212
2015-05-28 11:49:10 +01:00
James Koster 8c1e452514 proceed to checkout button template. closes #7507 2015-05-28 11:48:37 +01:00
Mike Jolley ba2e638e54 nocache download_file requests
Closes #8162
2015-05-28 11:44:47 +01:00
Nathan Dawson f9e43b874c Resolve blank shipping information bug. Fixes #8235
Setting the 'woocommerce_cart_needs_shipping' filter to true means the shipping fields can be shown for virtual products. Whether to check shipping details should be based on whether they're shown and not whether the cart needs shipping.
2015-05-28 00:54:05 +01:00
Claudio Sanches a76aa5218b Improved the new order and cancelled order emails descriptions, closes #8195 2015-05-27 16:57:57 -03:00
Claudio Sanches 676e09fdd3 Added new woocommerce_api_keys table in wpmu exclude and in status report 2015-05-27 16:46:43 -03:00
Claudio Sanches ebdcb0d9e8 [2.3] [API] Fixed subtotal_tax round and decimal dp, closes #8140 2015-05-27 16:18:02 -03:00
Claudio Sanches f503cda874 Improved hold stock input width, closes 8233 2015-05-27 14:26:12 -03:00
Claudio Sanches 169e72b824 Added extra arg to all woocommerce_order_item_name filters #8159 2015-05-27 13:29:15 -03:00
Claudio Sanches 88596b595e Improved PayPal get_icon_url() method 2015-05-27 13:23:21 -03:00
Claudio Sanches 6ff7215f3c Improved the error display for #7959 2015-05-27 13:19:44 -03:00
Mike Jolley 4fd9e1daf2 [2.3] Improved get_icon_url()
Closes #8211
2015-05-27 17:13:36 +01:00
Claudio Sanches 5c2b14d89f Standardise case of some strings closes #8125 2015-05-27 12:53:04 -03:00
Claudio Sanches 989dd5d88e Improved exclude_from_order_webhook check #8146 2015-05-27 12:46:44 -03:00
Claudio Sanches bc7d73f81f Merge pull request #8146 from mattallan/order_args_exclude_webhooks
New order post type param: exclude_from_order_webhook
2015-05-27 12:29:49 -03:00
Claudio Sanches cc9721ed9d Merge pull request #7959 from tivnet/patch-4
Check for non-existing attribute ID
2015-05-27 12:24:40 -03:00
Mike Jolley 5920b88d5d Add classes to tax and shipping labels/notices
Closes #8189
2015-05-27 16:17:36 +01:00
Mike Jolley 915342f38b [2.3] Only clear in delete_version_transients when version is set 2015-05-27 15:56:49 +01:00
Claudio Sanches 267c481d86 Improved admin bar visit store link #8196 2015-05-27 11:55:32 -03:00
Claudio Sanches e5e81e5516 Merge pull request #8196 from corsonr/visit_store_link
Added visit store link in admin bar
2015-05-27 11:35:49 -03:00
Nicola Mustone b5e193956b added action woocommerce_refund_deleted 2015-05-27 15:23:59 +02:00
Mike Jolley e383889957 [2.3] Optimise delete_version_transients
1. WC does not work network wide so _site_transient does not need
checking
2. The LIKE matches timeout and transient keys
2015-05-27 12:03:46 +01:00
Claudio Sanches 1caa5ebcee Improved WC_Geolocation support for IPv6 #8184 2015-05-26 17:32:47 -03:00
Claudio Sanches fcc9542608 Merge branch 'master' of github.com:woothemes/woocommerce 2015-05-26 14:41:24 -03:00
Claudio Sanches 44dba5036c Added geolocate IPv6 support, closes #8184 2015-05-26 14:41:13 -03:00
Mike Jolley 15e3d23022 Merge pull request #8209 from ChromeOrange/master
Update html-admin-page-status-report.php
2015-05-26 17:50:37 +01:00
Mike Jolley f1af777368 [2.3] Fix typo in validate_maximum_amount
Closes #8207
2015-05-26 17:40:07 +01:00
Claudio Sanches d53d21781b [2.3] Fixed product category media upload modal and some coding standards, closes #8227 2015-05-26 10:24:49 -03:00
Mike Jolley 28d838c5cd [2.3] Related posts tweaks
Remove real randomness and add transient caching to improve performance.

The above was not worth the cost of the query - only users refreshing a
product page would see a difference.
2015-05-25 15:40:28 +01:00
Claudio Sanches 9c5cd0e525 [API] Accept dashes in products/sku endpoint, closes #8220 2015-05-25 10:22:59 -03:00
Claudio Sanches 70b33b7919 Merge pull request #8221 from shivapoudel/settings-api
Introduce get_field_key method
2015-05-25 09:55:45 -03:00
Shiva Poudel cadc1ab301 Add id for title
Fixes scrutinizer issues for not having param
2015-05-25 17:32:30 +05:45
Shiva Poudel 9a818503b9 Updated blockUI Version 2015-05-25 17:03:41 +05:45
Shiva Poudel 2871df7451 Move the validate checkbox method above select 2015-05-25 16:58:08 +05:45
Shiva Poudel 4d46b35590 Clean settings-api docblock 2015-05-25 16:56:44 +05:45
Shiva Poudel d90bb50c20 Use get_field_key for validate_*_field 2015-05-25 16:41:08 +05:45
Shiva Poudel 3b9124e0cf Use get_field_key for generate_*_html 2015-05-25 16:28:19 +05:45
Shiva Poudel 597b152407 Introduce get_field_key method for settings API 2015-05-25 16:18:28 +05:45
Mike Jolley b8bcd24edd [2.3] Combine transients for get_rating_count
@claudiosmweb
2015-05-25 02:00:20 +01:00
Mike Jolley 62c70603ec [2.3] When updating transients, clear previous version of transients
Closes #8131 @claudiosmweb
2015-05-25 01:48:17 +01:00
Mike Jolley 1b73322874 [2.3] Replace max_related_posts_query with wp_count_posts 2015-05-25 01:20:31 +01:00
JeroenSormani b95b22d144 Add wc_get_order() tests + Order helper class 2015-05-23 10:48:07 +02:00
Andrew Benbow 79d4d921fd Update html-admin-page-status-report.php 2015-05-23 07:22:12 +01:00
Andrew Benbow 54437afc5c Update html-admin-page-status-report.php 2015-05-22 19:33:59 +01:00
Claudio Sanches be0f93f112 [2.3] Fixed theme check notice for core supported themes, closes #8208 2015-05-22 13:52:18 -03:00
Fulvio Notarstefano c0dda8c582 Typos conditonal_includes -> conditional_includes
I believe you meant 'conditional' - I don't think it's referenced elsewhere so it should be safe to rename
2015-05-22 16:01:55 +02:00
Remi Corson 611765e0da added comparison with home url 2015-05-22 13:59:51 +02:00
mehulkaklotar 05d5b421d6 filter when cart item remove notice item title, issue : #8204 2015-05-22 14:15:11 +05:30
Remi Corson db0ee68886 Added visit store link in admin bar 2015-05-21 10:57:50 +02:00
Mike Jolley 779b53b2bc Merge pull request #8187 from lukasjuhas/master
#8186 memory exhausted problem fix
2015-05-20 13:48:01 -04:00
Claudio Sanches 95535ea47d Removed sslverify=false and used wp_safe_remote_post() in WC_Auth 2015-05-20 14:24:44 -03:00
Mike Jolley 2763175d3e [2.3] Bump prettyphoto version to prevent caching 2015-05-20 10:56:45 -04:00
James Koster 6389e5defa related products / upsets. closes #7873 2015-05-19 13:07:00 -04:00
Mike Jolley c01bc43369 Adjust #8165 to deal with 0 2015-05-19 12:53:03 -04:00
Claudio Sanches 79a5c2e98d Moved the order type verification to WC_Order_Factory::get_order() #8180 2015-05-19 13:51:04 -03:00
Mike Jolley 6bdd713112 return true if cats get displayed only
Closes #8172
2015-05-19 12:49:34 -04:00
Mike Jolley a08b2e5968 Loop over all posted attributes by referencing max posted key
Closes #8165
2015-05-19 12:46:32 -04:00
Claudio Sanches ece787686d Added order type validation in wc_get_order() function, closes #8180 2015-05-19 13:21:47 -03:00
Lukas Juhas 21bda86baa #8186 memory exhausted problem fix
#8186 issue
2015-05-19 17:16:41 +01:00
Mike Jolley 0b58a840e2 Merge pull request #8168 from Nikker/master
Added method to check if cart is empty
2015-05-19 11:41:48 -04:00
Claudio Sanches e106d57947 Merged #8021 2015-05-18 16:53:04 -03:00
Claudio Sanches db87add809 Updated the auth endpoint to works with the new woocommerce_api_keys database 2015-05-18 16:46:52 -03:00
Claudio Sanches 22bf7d5c81 Created bulk revoke keys 2015-05-18 16:12:47 -03:00
Claudio Sanches 1c6b91ca14 Improved webhooks nonces and actions 2015-05-18 16:01:51 -03:00
Claudio Sanches 772d45bd06 Added method to revoke api keys 2015-05-18 15:46:16 -03:00
Claudio Sanches c4d4a623b5 Improved the API Keys table list, added actions and fixed the links 2015-05-18 15:33:36 -03:00
Claudio Sanches 2f5df9c185 Added methods to generate and edit API keys 2015-05-18 15:23:05 -03:00
Claudio Sanches 961843780d Merge pull request #8182 from corsonr/filters_widget_tweak
Filters Widget hooks tweak
2015-05-18 11:06:36 -03:00
Matt Harrison b656ef904a minor grammar fix. "an SSL" to "a SSL" 2015-05-18 09:03:51 -04:00
Remi Corson aa2e51f205 tweaked hooks 2015-05-18 12:48:36 +02:00
Claudio Sanches c49ab520b8 Created page to edit and create keys 2015-05-16 00:09:29 -03:00
Claudio Sanches 2689d8b51e Created api keys table list 2015-05-15 23:03:24 -03:00
Claudio Sanches 84c937c011 Improved the woocommerce_api_keys table 2015-05-15 22:52:00 -03:00
Claudio Sanches 20906f2248 Fixed the authentication with the new woocommerce_api_keys table 2015-05-15 21:16:53 -03:00
Claudio Sanches bee1fba738 Added nonces field in woocommerce_api_keys table 2015-05-15 18:25:41 -03:00
Claudio Sanches 41e8f69a70 Fixed the woocommerce_api_keys name 2015-05-15 18:20:49 -03:00
Claudio Sanches c76c965b59 Removed user api keys options 2015-05-15 18:04:58 -03:00
Claudio Sanches 0ecfc26a84 Created new database for api_apps
@mikejolley
2015-05-15 17:57:18 -03:00
Claudio Sanches 572712cb52 Improved the access to the keys/apps section in api tab 2015-05-15 17:14:31 -03:00
Claudio Sanches eb6f25b47b Moved some webhooks admin methods from WC_Settings_Rest_API to WC_Admin_Webhooks class 2015-05-15 16:50:30 -03:00
Claudio Sanches 7b8a24924a Moved api settings to API tab 2015-05-15 16:35:50 -03:00
Claudio Sanches 0edbfeaa35 Created new Settings API tab and moved the old webhooks tab to API tab 2015-05-15 16:12:11 -03:00
Mike Jolley 126eb578aa Upgrade routine 2015-05-15 16:27:11 +01:00
Mike Jolley fd772e41fa Show non existing tables in system status report #8147 2015-05-15 15:19:39 +01:00
Mike Jolley cc213de455 Add note and system status link to PP settings
Closes #8158
2015-05-15 14:50:48 +01:00
Mike Jolley 0e72c5e699 Class tidy 2015-05-15 14:16:44 +01:00
Mike Jolley c1e3da8bcb Return real json response during checkout
Closes #8086
2015-05-15 13:51:51 +01:00
Mike Jolley bb77120619 Auto load customer details + tweak icons
Closes #8112
2015-05-15 12:52:25 +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
roykho b812b2fd94 add dynamic variation description feature 2015-05-14 10:56:26 -07:00
Mike Jolley d53f78ed56 Styled auth and login endpoints 2015-05-14 16:58:34 +01:00
Mike Jolley 9a30f40d69 [2.3] Move action to prevent infinite recursion on login/restoring saved cart
Thanks @roykho. Follow up to #7852
2015-05-14 16:08:09 +01:00
Paul Kilmurray 27d50aef55 default properties for $order_fee class
The add_fee method on WC_Abstract_Order expects taxable, tax, tax_data
and tax_class properties to be present. The API ignores these
properties if taxable = false.
2015-05-14 16:10:56 +08:00
Mike Jolley 4311055aeb Send review moderation email to admin
Closes #8132
2015-05-13 15:47:32 +01:00
James Koster 0aef556a5c storefront prompt on add ons screen 2015-05-13 14:50:40 +01:00
Mike Jolley d19117a108 When paypal payment is on hold, reduce stock and empty cart.
Closes #8145
2015-05-13 14:28:17 +01:00
Mike Jolley 2a4f9f77db Throw API exception when order is invalid
Closes #8151 @claudiosmweb
2015-05-13 14:08:12 +01:00
matttallan 93d76e33f0 New order post type param: exclude_from_order_webhook
Allows others that are using custom order types to choose whether
webhooks for WC Orders should also be triggered.
More of a CPT approach than adding more hooks and filters :)
2015-05-12 14:01:23 +10:00
Claudio Sanches e6eaf11aa7 Fixed webhook filter name typo, closes #8135 2015-05-10 11:54:15 -03:00
Mike Jolley 02c346eb87 Filter before and after unsetting cart items
Closes #8110
2015-05-08 10:26:04 -07:00
Mike Jolley fa94a7c5e0 Merge pull request #8117 from SiR-DanieL/patch-1
Replace get_product_url with add_to_cart_url
2015-05-08 10:18:14 -07:00
Claudio Sanches b54a7a34a1 [API] Created bulk update/insert for coupons #7915 2015-05-07 13:13:41 -03:00
Claudio Sanches 05aad18c5e [API] Created bulk update/insert for customers #7915 2015-05-07 13:09:59 -03:00
Claudio Sanches 3a29a0b743 Fixed docblocks for WC_API_Orders:bulk() 2015-05-07 12:27:39 -03:00
Diego Zanella f375378f91 Refactored logic to allow altering PayPal refunds
* Replaced `wc_paypal_standard_refund_before` action with a more flexible `wc_paypal_standard_refund_args` filter.
2015-05-07 09:54:22 +01:00
Claudio Sanches 611cf9b521 [API] Created bulk update/insert for orders #7915 2015-05-06 18:41:48 -03:00
Claudio Sanches fd3c802516 Merge branch 'master' of github.com:woothemes/woocommerce 2015-05-06 18:18:22 -03:00
Claudio Sanches 431768df61 Improved the paypal logo for JP, closes #8119 2015-05-06 18:17:19 -03:00
Claudio Sanches 67fdba87eb Merge pull request #8121 from helgatheviking/master
change priority on custom email addresses in emails
2015-05-06 17:58:23 -03:00
Claudio Sanches 41e1ba2811 [2.3] [API] Fixed enable_html_description and enable_html_short_description for products endpoint, closes #8090 2015-05-06 14:28:57 -03:00
Claudio Sanches 08f8317554 [2.3] [API] Fixed start and end date for products, closes #8063 2015-05-06 13:55:40 -03:00
Kathy Darling bbf928ea9e change priority on custom email addresses in emails, so plugins can insert data between customer_details and addresses 2015-05-06 14:10:06 +02:00
Diego Zanella 23724bde07 Added new `wc_paypal_standard_refund_before` action
* The action will allow to intercept a refund just before it's placed, and to alter the parameters, if required.
2015-05-06 12:10:07 +01:00