Nestor Soriano
ae0d269128
Refactor duplicate code & add rounding to price calculations in WC_Admin_Post_Types.
...
Two methods have been created:
- update_stock_status, replaces code that was duplicated in the
quick_edit_save and bulk_edit_save methods.
- set_new_price, replaces code that was duplicated-ish in the
bulk_edit_save for setting the new regular and sales prices
(code was not identical but very similar).
Also, `round` is now used on sale price calculations that involve
multiplying by a percent, the same was as it was done already
to calculate the regular price.
2020-07-14 11:42:21 +02:00
Nestor Soriano
7d5b59953c
Fix code sniffer errors in WC_Admin_Post_Types.
2020-07-14 11:42:21 +02:00
Christopher Allford
2ef15f02e3
Renamed `WC_Cart::is_tax_displayed()` to `WC_Cart::get_tax_price_display_mode()` to clarify intent
2020-07-13 07:21:19 -07:00
Peter Fabian
23028a90a1
Schema has not been updated, so revert.
2020-07-13 15:34:54 +02:00
Christopher Allford
933cdd7a7b
Removed the default `id` field added to all CLI commands
...
Some of our endpoints don't have an "<id>" parameter but we're expecting one in the CLI. Since the `id` is already part of the supported IDs we don't actually need this since it will pull it from the route.
2020-07-10 14:16:30 -07:00
Christopher Allford
c3618cad47
Added the `instance_id` parameter to the CLI runner
...
This is used for shipping zone methods and so we need to be able to parse it too!
2020-07-10 07:21:05 -07:00
Christopher Allford
c2bf58a739
Fixed the accessibility of WC_Cart::is_tax_displayed()
...
Since we're calling the function from the base class we need it to be protected or this throws a fatal exception.
2020-07-09 13:39:16 -07:00
Peter Fabian
6bc0ca724f
Update versions and changelog from latest releases.
2020-07-09 13:18:51 +02:00
Claudio Sanches
864f451775
Merge pull request #26338 from woocommerce/fix/25561
...
Fixed user cap required to view the order count indicator
2020-07-08 12:09:28 -03:00
Claudio Sanches
eeb08467af
Merge pull request #26877 from woocommerce/fix/26547
...
Fixed WooCommerce menu for users that can only manage orders on WooCommerce
2020-07-08 12:08:29 -03:00
Ron Rennick
625857e9e1
add rating count to order by rating clause
2020-07-06 11:19:17 -03:00
Szabolcs Légrádi
5174baca35
Extend BACS accounts filter with order ID
2020-07-06 13:36:24 +02:00
Claudio Sanches
85580cfb4f
Merge pull request #26935 from woocommerce/fix/26822
...
[Tracker] Added order_total to orders_edit_status_change
2020-07-02 16:29:13 -03:00
Néstor Soriano
7fa34c6770
Merge pull request #26400 from woocommerce/fix/26242
...
Make WC_Cart::display_prices_including_tax() aware of tax display changes
2020-07-02 14:56:50 +02:00
vedanshujain
50b08a75ab
Show community forum link if wccom is not connected
2020-07-02 16:28:33 +05:30
Claudio Sanches
0d9b6786fd
[Tracker] Added order_total to orders_edit_status_change
2020-07-01 18:24:47 -03:00
Claudio Sanches
e20a69c35c
Fixed missing comma
2020-07-01 17:56:19 -03:00
Claudio Sanches
a1eb697bd3
Merge pull request #26634 from corsonr/fix-26633
...
Fix #26633 - Adds Custom Messages Upon WC Taxonomies Update
2020-07-01 14:36:38 -03:00
Claudio Sanches
101a8ae243
Added context
2020-07-01 14:36:22 -03:00
Claudio Sanches
f17535fabd
Merge pull request #26589 from mariovalney/fix/26588
...
Fixes issue #26588
2020-07-01 14:18:06 -03:00
Claudio Sanches
1de6bf0c28
Merge pull request #26515 from koko-ng/patch-1
...
Fix error message in wc_get_template
2020-07-01 13:27:05 -03:00
Claudio Sanches
1194225d71
Merge pull request #26503 from Knyazevich/origin/fix/wc_update_product_stock_status-phpdoc
...
Fix parameter type and add an empty line in wc_update_product_stock_s…
2020-07-01 13:21:21 -03:00
Claudio Sanches
0351aa546e
Merge pull request #26462 from db2000ro/fix/24885
...
Fix 24885 currency position RTL
2020-07-01 13:20:01 -03:00
Claudio Sanches
fddaed2899
Merge pull request #26325 from twoelevenjay/master
...
Conditionally change my account dashboard desc
2020-07-01 13:13:22 -03:00
Claudio Sanches
4d2bafcc49
Merge pull request #26219 from woocommerce/fix/wc-load-cart
...
`wc_load_cart` should load it's own dependencies and include required core files
2020-07-01 13:10:04 -03:00
Claudio Sanches
dec50429b4
Merge pull request #25240 from shamalisulakhe/issue-24266-solution
...
Issue 24266 solution - with rerf of
2020-07-01 13:00:58 -03:00
Claudio Sanches
cadbc759fe
Merge pull request #26680 from MihaiCraciun/master
...
Added missing closing select tag to the product exporter category select
2020-07-01 12:57:33 -03:00
Claudio Sanches
950b2253cb
Merge pull request #26846 from woocommerce/add/new_order_note_action
...
Add `woocommerce_order_note_added` action
2020-07-01 12:56:55 -03:00
Claudio Sanches
9ac5bcb586
Merge pull request #26697 from passatgt/master
...
Fixes for Hungarian address format and name order
2020-07-01 12:55:50 -03:00
Claudio Sanches
e736ac4145
Merge pull request #26837 from gamebits/patch-1
...
Add login link for existing account
2020-07-01 12:54:24 -03:00
Claudio Sanches
94d23605b8
Merge pull request #26658 from zackkatz/patch-1
...
Fix undefined index PHP warning
2020-07-01 12:48:13 -03:00
Claudio Sanches
2874915339
Merge pull request #26553 from szepeviktor/patch-2
...
Fix PHPDoc in WC_Notes_Run_Db_Update
2020-07-01 12:46:48 -03:00
Claudio Sanches
9c4ac29137
Merge pull request #26565 from woocommerce/fix/26510
...
Allow set "order key" while creating order via CRUD
2020-07-01 12:42:18 -03:00
Claudio Sanches
54f91a5a59
Merge pull request #26566 from woocommerce/update/26510-generate-order-key
...
Allow custom values in wc_generate_order_key()
2020-07-01 12:41:24 -03:00
Claudio Sanches
cac529c393
Merge pull request #26567 from woocommerce/fix/26510-created-date
...
Allow set "date_created" while creating orders via CRUD
2020-07-01 12:40:43 -03:00
Claudio Sanches
4450d2239f
Merge pull request #26660 from woocommerce/add/status-tools-prompt
...
Adds a prompt to confirm if should run tools in the Status page.
2020-07-01 12:39:54 -03:00
Claudio Sanches
f6cd453840
Merge pull request #26669 from woocommerce/fix/filter-params
...
Normalize parameters for woocommerce_product_importer_parsed_data filter
2020-07-01 12:39:17 -03:00
Claudio Sanches
ab8a1b78a3
Merge pull request #26668 from woocommerce/fix/typo
...
Fixed typo in WC_Product_CSV_Importer class
2020-07-01 12:39:03 -03:00
Claudio Sanches
6fc008c104
Merge pull request #26698 from woocommerce/fix/26643
...
Puerto Rico: Remove "City" field and rename "State" to "Municipality"
2020-07-01 12:38:28 -03:00
Claudio Sanches
32a3d29bd9
Merge pull request #26798 from danielmorell/patch-1
...
Fixed wc_get_order function name in doc block
2020-07-01 12:37:06 -03:00
Claudio Sanches
7647a122ab
Merge pull request #26920 from alamgircsebd/fix/wrong-capabilites-use-on-add-order-note
...
Fix - wrong capabilities use on add order note issue fixed
2020-07-01 11:42:45 -03:00
vedanshujain
8ded6a3057
Applied coding standards
2020-07-01 19:09:50 +05:30
vedanshujain
1b3f1d75ba
Limit stock changes for order items to status methods for consistency.
...
Methods `wc_maybe_increase_stock_levels` and `wc_maybe_reduce_stock_levels` already reduce/increase stock levels when statuses are changed, so no need to do this here.
2020-07-01 19:09:07 +05:30
Ron Rennick
84f5e61dbf
Merge pull request #26858 from woocommerce/fix/25833-2
...
add Google weblight user agent check
2020-07-01 09:31:35 -03:00
Alamgir
5cda3967ff
Fix - wrong capabilites use on add order note issue fixed
2020-07-01 10:14:22 +06:00
Claudio Sanches
c3608f3b57
Merge pull request #26878 from woocommerce/fix/26787
...
Moved synchronous webhook execution into a shutdown function
2020-06-30 16:34:12 -03:00
Claudio Sanches
0de1d4f9c0
Updated docblock
2020-06-30 13:32:11 -03:00
Claudio Sanches
54a94152ec
Map all deprecated keys in __isset()
2020-06-30 13:25:30 -03:00
Claudio Sanches
701490b13e
Apply suggestions from code review
...
Co-authored-by: Néstor Soriano <nestor.soriano@automattic.com>
2020-06-30 13:05:56 -03:00
Peter Fabian
64bbb09eb2
Merge pull request #26518 from lipemat/patch-1
...
Fix set cache loop when no attributes exist
2020-06-30 12:03:37 +02:00
Néstor Soriano
3a77066262
Merge pull request #26554 from jeffreyscottfrench/Fix--select_country-default-value
...
Sets "Select a country / region..." option element's value attribute to default in checkout page.
2020-06-30 10:34:06 +02:00
Nestor Soriano
9aa3c54bd9
Fix variable product stock status not being properly set on save
...
When a product is saved its validate_props method is invoked,
and this recalculates the stock_status property based on whether
the product manages stock or not, the stock quantity, and the
value of the woocommerce_notify_no_stock_amount option.
In the case of variable products, and when stock is managed, the stock
was set to "instock" when the current stock was enough, but only
if the "stock_quantity" property was in the list of changed properties
for the object (the method in the base product class doen't check
for changed properties). This is a problem because the
wc_update_product_stock function updates stock_quantity but via direct
database modification, and thus stock_quantity isn't considered
modified. Therefore stock modifications via wc_update_product_stock
don't update stock_status on the product (e.g. when going from 0 to 1
after a refund the stock status will remain as "outofstock").
The fix consists of removing the check for changed properties since
it's not done anyway in the other cases (when stock is below the
woocommerce_notify_no_stock_amount threshold) nor in the base class.
Also, validate_props is refactored for readabiliyy, and an useless
set_stock_status() call placed right before save()
in wc_update_product_stock is removed.
2020-06-29 14:32:17 +02:00
Néstor Soriano
7b3e902952
Merge pull request #26629 from woocommerce/fix/25552
...
Schedule a deferred product sync for products with parent on delete.
2020-06-29 14:15:10 +02:00
budzanowski
114ce81757
Use singular batch update endpoint.
2020-06-26 11:09:41 +02:00
Christopher Allford
7331036d17
Moved synchronous webhook execution into a shutdown function
...
One of the problems with synchronous webhooks is that they are executed as soon as the related action is. Since we may call an action multiple times in the process of updating something, this causes only the first action to trigger the hook. This differs from asynchronous execution because in that case, the web hook will be executed after the entire request has completed.
2020-06-25 16:54:17 -07:00
Claudio Sanches
0757f711de
Need to use edit_others_shop_orders also for coupons menu item
2020-06-25 20:34:28 -03:00
Claudio Sanches
8609500cc2
Check for the correct cap for shop_coupon
2020-06-25 20:31:06 -03:00
Claudio Sanches
f5b9af8591
Keep WooCommerce menu structure if user can edit others shop orders
2020-06-25 20:01:12 -03:00
Ron Rennick
ce70d6ad7a
add Google weblight user agent check
2020-06-24 14:26:25 -03:00
Dan Bitzer
25fbe58872
Add order note action docblock
2020-06-24 09:35:46 +09:30
Claudio Sanches
f4d11c89f3
Merge branch 'master' into issue-24266-solution
2020-06-23 16:47:30 -03:00
Ron Rennick
e9f71ac24c
Merge pull request #26802 from woocommerce/fix/25833
...
introduce woocommerce_enable_nocache_headers filter
2020-06-23 13:35:13 -03:00
Ron Rennick
e56ef185b0
Merge pull request #26809 from woocommerce/fix/25606
...
remove privacy page dropdown
2020-06-23 13:34:33 -03:00
Claudio Sanches
6890251b0e
Fixed typos and coding standards
2020-06-23 11:51:19 -03:00
Claudio Sanches
3bb7f30c01
Merge branch 'master' into fix/25561
2020-06-23 11:23:29 -03:00
Claudio Sanches
f2299ecfa8
Fixed coding standards
2020-06-23 11:09:21 -03:00
Dan Bitzer
9cddd9ae18
Add `woocommerce_order_note_added` action
...
This action provides an easier way to perform an action when a non-customer order note is added.
2020-06-23 16:55:08 +09:30
Ken Gagne
bc210d6db1
Add login link for existing account
...
When a logged-out user tries to check out with an email address associated with an existing account, they are prompted to log in. This PR updates that prompt with a link to the login form. Though other opportunities to log in should already exist elsewhere on the checkout page (such as `form-login.php`'s "Returning customer?" prompt), this change makes it more explicit and intuitive.
2020-06-22 09:57:28 -06:00
Ron Rennick
4a9fb66a39
update comment to accurate description
2020-06-18 10:56:31 -03:00
Ron Rennick
a88a708286
remove privacy page dropdown
2020-06-18 10:40:17 -03:00
Ron Rennick
6743073a0f
introduce woocommerce_enable_nocache_headers filter
2020-06-17 15:02:09 -03:00
Daniel Morell
94e317f9f8
Fixed wc_get_order function name
...
The WC_Abstract_Order __construct() method doc block had the wc_get_order() method referred to as get_order().
2020-06-17 10:49:40 -05:00
Ron Rennick
3763d3b428
Merge pull request #25982 from leewillis77/feature/add-label-to-taxonomies
...
Add label to unlabelled taxonomies
2020-06-17 10:54:50 -03:00
Peter Fabian
14a26aca2c
Update min files and selectWoo
2020-06-16 17:15:12 +02:00
Peter Fabian
418d95298a
Merge branch 'master' into update/wc-admin-1.3.0-beta-1
...
# Conflicts:
# composer.lock
2020-06-16 14:58:43 +02:00
Peter Fabian
35ee21f837
Merge pull request #26754 from woocommerce/fix/25544
...
Encode HTML entities in product attributes
2020-06-16 14:29:19 +02:00
Peter Fabian
bb2cf2e8dc
Removed deprecated method call.
2020-06-16 13:18:05 +02:00
Peter Fabian
ce740fdb44
Merge pull request #26739 from woocommerce/fix/24800
...
Export: properly escape commas in attribute values
2020-06-16 12:56:40 +02:00
Peter Fabian
dc0d567137
Merge pull request #26775 from woocommerce/update/php7.2
...
Show notice to update to latest PHP if version is < 7.2
2020-06-16 12:56:15 +02:00
Peter Fabian
c35c4f1f08
Merge pull request #26395 from woocommerce/revert-26226-revert-25708-update/reserve-stock-for-checkout
...
Introduce a `reserved stock` class and database table to prevent race conditions during checkout
2020-06-16 11:38:10 +02:00
Peter Fabian
32037e37dd
Merge pull request #26625 from woocommerce/add/homescreen-option
...
Homescreen: Enable for new stores and add Features Setting section
2020-06-15 21:54:06 +02:00
Peter Fabian
0c96b1452d
Merge pull request #26685 from woocommerce/fix/26248
...
Removed the notice for untested minor version updates
2020-06-15 21:40:22 +02:00
Vedanshu Jain
8dcb48219b
Merge pull request #26752 from woocommerce/fix/25143
...
Add template cache clearing
2020-06-15 23:47:24 +05:30
vedanshujain
513b517b5b
Show notice to update to latest PHP if version is < 7.2
2020-06-15 21:51:03 +05:30
vedanshujain
34e5d3daa3
Use single sentence for easier translations.
2020-06-15 19:09:52 +05:30
vedanshujain
b8a1a69b2b
Updated annotations to 4.3
2020-06-15 18:55:00 +05:30
Paul Sealock
c7ad889f93
Homescreen: add option and setting
2020-06-15 13:38:02 +12:00
budzanowski
8f4e1a90c1
Typo fix.
2020-06-14 11:38:57 +02:00
budzanowski
bb7e5d1018
Connect the translations server.
2020-06-14 11:14:29 +02:00
jonathansadowski
386eecda62
Merge pull request #26729 from woocommerce/fix/26367
...
Update saving of comment_type for reviews to account for WP 5.5 changes
2020-06-12 10:36:28 -05:00
Vedanshu Jain
60ffc7ab99
Merge pull request #26583 from woocommerce/fix/26582
...
Fix regression caused by merging #25092 conflicting with #24828
2020-06-12 15:13:21 +05:30
Ron Rennick
4a8af2ec5d
Merge pull request #26706 from dorelidan/patch-1
...
Update wc-template-functions.php
2020-06-11 16:23:39 -03:00
Jonathan Sadowski
4d6aad4ecb
Encode HTML entities in product attributes
2020-06-11 14:10:05 -05:00
Ron Rennick
dd5cd361bc
introduce wc_set_template_cache(), wc_clear_template_cache()
2020-06-11 14:06:56 -03:00
budzanowski
5277bf8b60
Add language packs automatic delivery code.
2020-06-11 14:31:55 +02:00
Peter Fabian
296112cbea
Merge pull request #26237 from woocommerce/fix/24000
...
Fix adding product variant to cart using `add-to-cart` parameter (#24000 )
2020-06-11 13:13:12 +02:00
Peter Fabian
439562e854
Merge pull request #23971 from woocommerce/refactor/23783
...
Better template caching for container environments
2020-06-11 10:13:46 +02:00
Peter Viszt
4a60386560
Removed duplicated class from the HU city field
2020-06-10 17:54:12 +02:00
Jonathan Sadowski
5b232ff489
Export: properly escape commas in attribute values
2020-06-09 16:01:32 -05:00
Jonathan Sadowski
f9731bb2ed
Update saving of comment_type for product reviews to account for WP 5.5 default comment_type
2020-06-08 17:36:34 -05:00