Commit Graph

21076 Commits

Author SHA1 Message Date
Vedanshu Jain 03ba8838b1
Merge pull request #29099 from woocommerce/fix/27376
Make the refunds creation REST API behave more as documented
2021-02-18 14:25:38 +05:30
Néstor Soriano 9c2b8ac9fd
Remove extra space at end of a couple of lines 2021-02-18 09:38:17 +01:00
Moon bc3219e22e Add tests for the finish setup dashboard widget and clean up code 2021-02-17 16:07:50 -08:00
Moon 6284cbee3a Add a new dashboard widget to promote store setup 2021-02-17 12:10:13 -08:00
Niels Lange e9d425ba65
Update includes/wc-template-functions.php
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2021-02-17 21:09:18 +07:00
louwie17 2471f816e4
Merge pull request #29093 from woocommerce/update/28570_widget_stock_links
Update the woo widget stock links to new analytics page
2021-02-17 09:35:50 -04:00
James Allan 264bccf505 Prevent displaying coupon form on checkout requiring login 2021-02-17 11:42:30 +10:00
Claudio Sanches 6fae8ca40b
Merge pull request #29146 from woocommerce/fix/27290-rest-api-order-updates
Throw an error if a coupon item ID (readonly) is specified during an order update | #27290
2021-02-16 17:04:49 -03:00
barryhughes 24e0191dc7 Throw a 400 error if a coupon item ID (readonly) is posted/put during an order update | #27290 2021-02-16 09:59:03 -08:00
jonathansadowski f6054ab059
Merge pull request #29115 from woocommerce/fix/27434
Fix wrong taxonomy caching in term and product attributes controllers
2021-02-16 10:50:28 -06:00
Claudio Sanches e4b2b72e95
Merge pull request #29136 from woocommerce/fix/25510-billing-address-2
Only add '(optional)' to the billing_address_2 placeholder | #25510
2021-02-16 13:32:50 -03:00
artpi cca06857e9 Fix tests 2021-02-16 16:19:55 +01:00
artpi dc7410b6b3 Extra protections 2021-02-16 15:51:49 +01:00
artpi 774d7e38cd Better url parsing 2021-02-16 15:09:23 +01:00
artpi 0b076fb9c1 Fix to treat absolute local paths as relative ones 2021-02-16 10:40:14 +01:00
Moon 3707764736 Add tracking to WooCommerce Status widget -- net-sales, order-processing, orders-on-hold, low-stock, and out-of-stock 2021-02-15 16:41:14 -08:00
jonathansadowski ea7c6700bc
Merge pull request #29133 from woocommerce/fix/notice
Check if index value is set before accessing
2021-02-15 16:55:37 -06:00
barryhughes 8f74a25998 Remove esc_attr() (not an attribute, plus escaping is applied later in request) | #25510 2021-02-15 14:15:48 -08:00
barryhughes 1bd9a7e939 Only add '(optional)' to the billing_address_2 placeholder | #25510 2021-02-15 13:49:28 -08:00
Claudio Sanches 74bb66dc6d
Merge pull request #27671 from mahmoudsaeed/master
Make WC_Tax::get_tax_rate_classes() public
2021-02-15 14:31:25 -03:00
roykho 4fa0c81d11
Check if index value is set before accessing 2021-02-15 06:54:22 -08:00
hsing f333b373f6 Remove extra content wrapper 2021-02-12 17:50:48 -05:00
Claudio Sanches 7a71258257
Merge pull request #29094 from woocommerce/try/admin-menu-svg-icons
Use SVG and Dashicons instead of custom font for admin bar icons
2021-02-12 18:06:37 -03:00
Tyler Paulson 812976c65c Correct function summaries in the WC_Shipping_Rate class 2021-02-12 12:12:27 -05:00
Matt Sherman 6044f3e958 Update Products and Reports icons to use Dashicons instead of custom font 2021-02-12 10:37:23 -05:00
Nestor Soriano 4e195d5f3f Fix code sniffer errors. 2021-02-12 15:29:32 +01:00
Nestor Soriano 00d6dc40f7 Fix wrong caching of taxonomy in terms and attributes controllers.
The WC_REST_Terms_Controller and WC_REST_Product_Attributes_V1_Controller
classes have a get_taxonomy method that gets the name of the taxonomy
to process from a taxonomy id passed in the request, but once the
taxonomy name has been obtained it's cached and sbsequently reused.
The problem is that these controller instances are reused if more than
one request is processed programmatically, and thus the taxonomy that
was cached once is always used even if the new request specifies a
different taxonomy id.

The fix consists of using a dictionary of taxonomy id - taxonomy name
instead of one single taxonomy for caching.

In the case of WC_REST_Terms_Controller there's a protected $taxonomy
property that needs to be kept for compatibility, it's now set to
the last taxonomy name that has been introduced in the dictionary.
2021-02-12 15:12:58 +01:00
Takashi Kitajima 307a257781
Add translator comment #29008 2021-02-12 11:55:26 +09:00
Fernando Marichal 15424c99d6 Merchant email notes now are turned off by default
This commit turns off the merchant email notes by default
2021-02-11 14:15:17 -03:00
Matt Sherman 9f00fbfde1
Move admin menu manipulation from admin_head to admin_menu (#29088) 2021-02-11 11:48:36 -05:00
Roy Ho 2641bb7b6f
Merge pull request #28627 from woocommerce/update/tracks/global-props
Tracks: Add woo version as global track prop.
2021-02-11 05:48:25 -08:00
Néstor Soriano 9105910234
Merge pull request #28950 from woocommerce/exporter_product_type_filter
Add filter to allow third-parties to filter exportable product types
2021-02-11 14:32:17 +01:00
Vedanshu Jain 5a707f3e74
Merge pull request #28849 from woocommerce/fix/27521-2
Verify country code on checkout
2021-02-11 18:59:04 +05:30
Roy Ho 78851e6945
Merge pull request #28980 from leewillis77/add/add-generation-date-to-status-report
Add time of generation to the system status report
2021-02-11 05:09:03 -08:00
Nestor Soriano fae00e2bdf Make the refunds creation REST API behave more as documented
- Allow the list of line items to be a non-associative array
  where each item is identified by an "id" field
- Same for taxes inside line items, specify amount to refund in
  a "refund_total" key as in the case of line items
- Allow "quantity" keys as synonyms of "qty"

Also calculate "amount" automatically if missing and when all the
line items and taxes have a valid "refund_total" key.
2021-02-11 09:51:13 +01:00
Roy Ho 986b4fe0b9
Merge pull request #29089 from woocommerce/fix/issue-29087
Type cast floats to prevent string addition errors in PHP 8 closes #2…
2021-02-10 19:16:53 -08:00
Claudio Sanches 69c5d428a2
Merge pull request #29095 from woocommerce/fix/conditional-wc-admin
Check if WC Admin is active before showing message
2021-02-10 19:45:34 -03:00
Roy Ho 84c1e64a1d
Merge pull request #29036 from mehul0810/issue/28992
Removed extra closing brace ) from the Zone regions help text.
2021-02-10 13:52:33 -08:00
roykho 315c4de5c3
Check if WC Admin is active before showing message 2021-02-10 13:21:35 -08:00
Lourens Schep 5c6331593a Remove unnecessary wp-admin from urls 2021-02-10 16:42:04 -04:00
Matt Sherman cca38a577e Use SVG instead of CSS/font for WooCommerce icon 2021-02-10 15:12:47 -05:00
Lourens Schep 2db09d410b Change widget stock links to new analytics page when wc_admin is not disabled 2021-02-10 15:04:04 -04:00
roykho 93e528f8ea
Type cast floats to prevent string addition errors in PHP 8 closes #29087 2021-02-10 10:06:25 -08:00
Nestor Soriano e82ab487b6 validate_posted_data: check if we actually need to validate the shipping country. 2021-02-10 10:05:24 +01:00
Nestor Soriano 87d04b8d64 Remove no longer relevant exception doc comment 2021-02-09 10:07:43 +01:00
Nestor Soriano 26f71af0a9 Fix in the logic of 'validate_checkout' regarding non-existing countries. 2021-02-08 16:20:33 +01:00
Nestor Soriano 9e2776bdfa Use 'isset' instead of 'array_key_exists' for 'country_exists'. 2021-02-08 15:58:02 +01:00
Nestor Soriano 07f3d9dee6 Add unit tests for the WC_Checkout class. 2021-02-08 15:49:38 +01:00
Nestor Soriano 70202c35bd Move country validation to 'validate_posted_data'.
Also, when shipping to billing address don't show the error twice,
and show the "we don't ship to X" error only if the country actually
exists (if it doesn't then we'll have shown the "X is not a valid
country code" already).
2021-02-08 15:37:50 +01:00
Niels Lange 63cac6fb82
👌 IMPROVE: Add body class woocommerce-shop to shop page 2021-02-08 14:55:07 +07:00
jonathansadowski 10f92ca091
Merge pull request #29043 from woocommerce/fix/25261
Fix price filtering when there are variations.
2021-02-05 12:19:42 -06:00
Nestor Soriano 3976abffd6 Fix price filtering when there are variations.
The price filtering query wasn't working properly when there are
variations with different prices: if at least one variation was
outside of the price range but other were inside, the product wasn't
being listed.
2021-02-05 16:34:42 +01:00
Mehul Gohil beb5916947
remove unnecessary closing brace in help text 2021-02-05 01:02:20 +05:30
Roy Ho e57c07eeb5
Merge pull request #28983 from woocommerce/fix/issue-28649
Update tax rate label when saving order closes #28649
2021-02-04 05:40:23 -08:00
jonathansadowski e5a3ac48aa
Merge pull request #28933 from Mindsize/wc-24581-holding-stock-minutes
Wc 24581 holding stock minutes
2021-02-03 16:05:18 -06:00
Takashi Kitajima ed042b5a83
The order of the full name returned by WC_Countries::get_formatted_address()
`WC_Abstract_Order::get_formatted_billing_full_name()` and 
`WC_Abstract_Order::get_formatted_shipping_full_name()` displays the names in the correct order according to the language, but `WC_Countries::get_formatted_address()` does not.
2021-02-03 14:21:43 +09:00
James Allan 53e6a7317b Add filter to allow third-parties to filter exportable product types 2021-02-02 14:41:03 +10:00
Claudio Sanches 0bd9c11b44 Fix conditional 2021-02-01 19:30:43 -03:00
Claudio Sanches 31af5530e0 Proper implementation of wp_robots_no_robots 2021-02-01 19:15:10 -03:00
mfs-mindsize 5be2c80b89 adjusted new filter's default to option value + added absint 2021-02-01 14:16:30 -05:00
mfs-mindsize 23ecd6b3da adjusted new filter's default to option value + added absint 2021-02-01 14:16:10 -05:00
mfs-mindsize 1398219b95 adjusted new filter's default to option value + added absint 2021-02-01 14:15:41 -05:00
mfs-mindsize 8d600826a4 updated docblock's since to 5.1.0 (from 4.9.03) 2021-02-01 13:43:50 -05:00
Roy Ho 700fc9c594
Merge pull request #28735 from leewillis77/bugfix/customizer-visibility-fix
Fix visibility of checkout field settings in customizer
2021-01-29 07:47:16 -08:00
Lee Willis 6b0a88f6ef Add time of generation to the system status report 2021-01-29 12:52:27 +00:00
Vedanshu Jain f44d160256
Merge pull request #28880 from woocommerce/fix/issue-28805
Add in optional semicolon closes #28805
2021-01-29 17:21:15 +05:30
Néstor Soriano a5d96eefd1
Merge pull request #28974 from woocommerce/fix/issue-25375
Flush term cache when saving product and settings closes #25375
2021-01-29 12:17:52 +01:00
roykho b2eb2d8724
Update tax rate label when saving order closes #28649 2021-01-28 14:42:40 -08:00
Claudio Sanches 6701ce9c9d
Merge pull request #26983 from woocommerce/fix/25082
Use tax location from order while computing tax in discount.
2021-01-28 16:59:59 -03:00
roykho 8b0915c4e0
Flush term cache when saving product and settings closes #25375 2021-01-28 08:26:24 -08:00
Peter Fabian afbc0ab42d
Merge pull request #28893 from woocommerce/tracker_return_string_values
Tracker return string values for order related data
2021-01-28 13:17:04 +01:00
mfs-mindsize c1c2a8d4ad added docblock for new hook (per @claudiosanchesr) 2021-01-27 13:48:05 -05:00
Menaka S 778c4e2907 Typecast instead of using strval() 2021-01-27 20:39:41 +05:30
Menaka S 203e5ff2a8 Convert all values collected to string 2021-01-27 18:39:52 +05:30
Claudio Sanches 41d26ea283 Use wp_robots_no_robots() when available
Adds support for WP 5.7 wp_robots_no_robots().
Note that wp_no_robots() is deprecated on WP 5.7.
2021-01-26 20:00:02 -03:00
Roy Ho f9a02d1029
Merge pull request #28834 from woocommerce/fix/comment-typos
Fix typos in comments
2021-01-26 08:23:54 -08:00
Roy Ho ff06542a87
Merge pull request #28905 from mehrshaddarzi/patch-1
change attibutes to attributes
2021-01-26 08:17:23 -08:00
Roy Ho 5dd53439e0
Merge pull request #28927 from sc0ttkclark/patch-1
Fix fatal error problems by no longer adding false to the list of orders
2021-01-26 08:07:37 -08:00
Claudio Sanches ee28da5d30 Prepare default branch for 5.1 2021-01-25 16:38:22 -03:00
Scott Kingsley Clark ceb3a0d753
Fix fatal error problems by no longer adding false to the list of orders
By adding this prevention, it also stops fatal errors (calling method on non-object) from happening down the line when working with the orders list that is always assumed to be a proper order object.

Example error this prevents:

```
Fatal error: Uncaught Error: Call to a member function get_items() on bool in /wp-content/plugins/woocommerce/includes/class-wc-order.php on line 1902
```
2021-01-25 10:11:14 -06:00
Mehrshad Darzi e67003b568
change attibutes to attributes 2021-01-23 15:39:01 +03:30
Claudio Sanches 5d70d1919d Remove duplicated float 2021-01-22 15:43:21 -03:00
Claudio Sanches 1412d2ac96 Pass original price in filters to improve compatibility 2021-01-22 14:57:43 -03:00
Roy Ho 93c6ba02b9
Merge pull request #28900 from woocommerce/fix/28888
Fixed "Unsupported operand types" error when using empty strings
2021-01-22 08:15:47 -08:00
Albert Juhé Lluveras d896ed13e8 Remove unnecessary dots 2021-01-22 17:13:49 +01:00
Albert Juhé Lluveras 23db1a0e1f Fix typos in comments 2021-01-22 17:13:49 +01:00
Claudio Sanches 11ae40f66c Fixed "Unsupported operand types" error when using empty strings
Prevents wc_price() to throw PHP 8 warnings in case of an empty string
2021-01-22 12:58:45 -03:00
Nestor Soriano ef9a11976c WC_Countries::country_exists no longer throws an exception. 2021-01-22 10:57:25 +01:00
Menaka S 3a53c31aea Do not return default values for first/last order times 2021-01-22 10:31:22 +05:30
roykho e86dc6a9ee
Remove html_entity_decode 2021-01-21 12:17:22 -08:00
roykho d550cce434
Addressed feedback by adding whitelisted nonce actions 2021-01-21 12:08:20 -08:00
roykho 0bdf9a6341
Add in optional semicolon closes #28805 2021-01-21 06:27:44 -08:00
roykho 21f872e766
Fix merge conflict 2021-01-20 07:10:47 -08:00
roykho 52a2ce0300
Move nonce prepartion into core utilizing filter hook from WC Admin 2021-01-20 07:06:23 -08:00
Claudio Sanches eca9ae7e4c Updated docblock 2021-01-19 18:07:52 -03:00
Claudio Sanches de81f2d686 Remove filter after email is sent 2021-01-19 17:57:48 -03:00
Claudio Sanches aea6e02a2a Fixed method with signature changed and introduced new filter instead 2021-01-19 17:51:31 -03:00
Peter Fabian 0d7e5d1596
Merge pull request #28584 from woocommerce/add_orders_count_by_gateway
Track order counts by payment method
2021-01-19 11:45:02 +01:00
Peter Fabian 31a3b6a7ba Fixed the deprecation version 2021-01-19 11:10:58 +01:00
Nestor Soriano aae44ac1cd Fix code sniffer errors 2021-01-19 10:56:08 +01:00