Commit Graph

5551 Commits

Author SHA1 Message Date
Renatho De Carli Rosa c2b066edcb Fix requires_php check 2020-11-13 16:47:26 -03:00
Renatho De Carli Rosa 5cbcdcd92c Add requires_php support
With this check, we're able to avoid updates when the PHP version
is not supported
2020-11-13 16:47:26 -03:00
Christopher Allford 03f65478f2
Merge pull request #28249 from woocommerce/add/composer-2
Update Composer to v2 (includes woocommerce-blocks 3.8.0 and woocommerce-admin 1.7.0)
2020-11-12 21:16:51 -08:00
Christopher Allford 2516414eb6
Merge pull request #28229 from woocommerce/add/wc-pay-extensions-screen
Add WooCommerce Payments banner to extensions screen
2020-11-12 14:21:01 -08:00
Christopher Allford 30d2e278b9 Replaced the deprecated `WC_Admin_Note` class 2020-11-12 13:26:30 -08:00
roykho 5597f74e81
Merge branch 'master' into fix/issue-27972 2020-11-12 06:21:52 -08:00
roykho 134786ada8 Fix stock reducing incorrect amount when order item is deleted after a refund closes #27504 2020-11-11 15:28:06 -06:00
Gerhard Potgieter 6832dc96a4 Make wc shipping button also purple 2020-11-10 19:43:11 +02:00
Gerhard Potgieter 3c1352d36c Remember to break 2020-11-10 19:36:34 +02:00
Gerhard Potgieter caf2ea99fa Shorten title as per feedback 2020-11-10 19:26:44 +02:00
Gerhard Potgieter a0812d5009 Remove redirect as it does not work with the background installer 2020-11-10 18:28:47 +02:00
Gerhard Potgieter b5fb7c0104 Add purple woo button 2020-11-10 18:26:59 +02:00
Gerhard Potgieter b5a4a1597f Fix current section check, phpcs linting errors. 2020-11-10 16:48:11 +02:00
Gerhard Potgieter 692dfa7fec Update banner copy 2020-11-09 15:21:38 +02:00
Gerhard Potgieter 8af8554770 Add functionality to handle woocommerce payments install 2020-11-09 14:48:49 +02:00
Gerhard Potgieter 7d33488d6b WooCommerce Services to WooCommerce Shipping 2020-11-09 14:22:20 +02:00
Gerhard Potgieter 78336781d1 Remember output_ in function name 2020-11-09 14:20:24 +02:00
Gerhard Potgieter b1d9363918 Add wc payments to extensions addons page. 2020-11-09 14:19:11 +02:00
roykho 4c079ea99e
Update SSR version to check against major versions only closes #27972 2020-10-27 08:16:35 -07:00
Roy Ho c96a642e8a
Merge pull request #28067 from woocommerce/fix/27529
Fix: use the correct parameter when calling get_avatar()
2020-10-26 07:46:51 -07:00
Rodrigo Primo 09faf8ba84 Fix: use the correct parameter when calling get_avatar()
`WC_Admin_Dashboard::recent_reviews()` was calling `get_avatar()` passing `$comment->comment_author` which is not one of the list of parameters that the function accepts to get the avatar. As a result, the widget that displays the recent reviews in the admin dashboard was never displaying the avatar of the user that left the review. This commit fixes this issue by passing `$comment->comment_email` instead. I opted to use `$comment->comment_author` as it should be available for reviews left both by authenticated and anonymous users and because getting the comment object wouldn't be so simple (either we need to perform an extra query for each review or deprecate the `woocommerce_report_recent_reviews_query_from` filter).
2020-10-22 17:43:59 -03:00
Rodrigo Primo e91872c1a8 PHPCS fixes 2020-10-22 17:34:47 -03:00
pjv f03bfb85da Fix incorrect capability for product sorting link
Fixes #28049
2020-10-22 13:03:35 -05:00
Rodrigo Primo 0a81188e42
Merge pull request #27987 from woocommerce/php8/fix-required-parameters-after-optional-take-2
[PHP 8] Convert optional-before-required parameters into required parameters (take 2)
2020-10-17 09:42:20 -03:00
roykho e8bcd464db
Update escape based on suggestion 2020-10-16 06:00:34 -07:00
Nestor Soriano 63ced34e2d Convert optional-before-required arguments to required (take 2)
In PHP 8 required parameters after optional parameters in
function/method signatures trigger a deprecation notice. These type
of parameters are pointless since a value needs to always be
provided for them anyway, so they are actually de-facto required.

This commit converts all these not-so-optional parameters into
truly required parameters by removing their default values.
2020-10-16 13:08:31 +02:00
roykho 800cbdbc7e
Add missing escapes 2020-10-15 16:31:56 -07:00
roykho ace411aacd
Fix billing email being parsed as a URL link when beginning of email contains www closes #25099 2020-10-15 14:25:03 -07:00
Néstor Soriano e4a109f0d1
Merge pull request #27763 from woocommerce/fix/27445
Remove protection as we already diff and update only if needed.
2020-10-15 10:01:34 +02:00
Claudio Sanches e34681dbb4
Merge pull request #27696 from woocommerce/fix/version-race-conditions
Fix some race conditions in WC_Install
2020-10-14 20:18:47 -03:00
Claudio Sanches 23fe4f71bb
Merge pull request #27842 from sudoshreyansh/fix/27839
Fixed </strong> closing tag position. Issue: #27839
2020-10-14 18:06:10 -03:00
Néstor Soriano c15488d840
Merge pull request #27830 from woocommerce/php8/fix-round-function-with-non-numeric-argument 2020-10-09 08:01:44 +02:00
Knyazevich ce59afb2b9 Simplify drafts excluding logic (ref #24136) 2020-10-06 18:11:58 +03:00
Knyazevich f551c6c792 Exclude drafts from the "Shop page" select (ref #24136) 2020-10-06 06:42:56 +03:00
sudoshreyansh dd9bf06594 Fixed </strong> closing tag position. Issue: #27839 2020-10-02 15:46:41 +05:30
Nestor Soriano 52eed70f04 Add a 'NumberUtil' class with a 'round' method.
There's a number of places in the WooCommerce codebase where the
built-in function 'round' is executed passing a non-numeric value
(not a number and not a string that can be parsed as a number),
for example round(''). In PHP 7 this yields a value of 0, but in
PHP 8 this throws an error.

This commit adds a 'NumberUtil' class with a static 'round' method,
this method checks if the passed value is numeric and if so it just
executes the built-in function, otherwise it returns 0. And all the
calls to 'round' in the codebase are replaced with 'NumberUtil::round'.
2020-10-01 11:08:51 +02:00
vedanshujain c69e1f5799 Remove protection as we already diff and update only if needed.
In #26642 we removed adding reduced_stock meta when adding new order item to prevent ghost entries, but in inadvertently exposed an underlying bug where _reduced_stock meta was getting set to 0 if its emtpy.

We were then checking the presence of this meta, but also not reducing the stock in case it was not set.
2020-09-24 00:54:24 +05:30
Rodrigo Primo c3a72b994a Fix version in which the setup wizard was deprecated
The setup wizard is going to be deprecated in WC 4.6.0 which should be
released soon. Some functions were marked as if they were deprecated in
WC 4.5.0 which is not the case.
2020-09-22 11:20:33 -03:00
Rodrigo Primo 51fd4af1b2 Remove call to __() from deprecation messages
Doing this as AFAIK we don't typically support traslation for
deprecation messages.
2020-09-22 11:18:43 -03:00
Rodrigo Primo 7401982d37
Merge pull request #27047 from woocommerce/fix/26972
Removed Features settings and home screen option
2020-09-18 16:46:43 -03:00
Ron Rennick 4b3b40d42e address feedback 2020-09-18 15:22:24 -03:00
Ron Rennick 43051a0950 update deprecation versions to 4.6.0 2020-09-18 13:16:46 -03:00
Ron Rennick 9915a5b142 merge master 2020-09-18 12:53:28 -03:00
Claudio Sanches 29b8b0d60d
Merge pull request #27701 from woocommerce/fix/rest-api-package-tag
Fixed usage of package tag in REST API and templates
2020-09-17 18:45:14 -03:00
Claudio Sanches 153ce009de Fixed helper header 2020-09-17 16:50:17 -03:00
Claudio Sanches 3377c60c5e
Merge pull request #27433 from woocommerce/fix/remove-relative-include-paths
Change relative include paths to absolute include paths
2020-09-17 13:15:40 -03:00
Claudio Sanches f4e9fcc1a4 Fixed missing include 2020-09-17 13:12:57 -03:00
Konstantin Kovshenin a100ed67b2 Fix race conditions in WC_Install
In an environment with persistent object caching, concurrent calls
to delete_option() + add_option() can result in the option value
leaking out of the alloptions cache key, and into its own cache
item under the options group, while deleting the value from the
database.

This causes future function calls to add_option() to fail, since
the value already exists in cache (under the wrong key). It also
causes calls to delete_option() to fail, since the value is not
in the database.

This commit forces update_option() instead of the delete + add
combination, as well as removes multiple unnecessary calls to
update the woocommerce_db_version from admin notes and notices.
2020-09-17 11:59:50 +03:00
Rodrigo Primo d50cd4389b Fix using tax classes with some non-ASCII characters
This commit fixes a bug that made it impossible to assign to a product a tax class that contained non-ASCII characters that are URL encoded by sanitize_title().

WooCommerce uses sanitize_title() to generate a slug when creating a tax class (d48f1d4e2e/includes/class-wc-tax.php (L808)). sanitize_title() converts some non-ASCII to ASCII equivalents (those handled by remove_accents()) and URL encodes others (like some Greek characters, for example).

The code was using wc_clean() to sanitize the tax class when the user edited a product. The problem is that wc_clean() removes URL encoded characters, changing the slug of some tax class, causing WooCommerce to use the standard tax class instead without any errors. To fix this issue, this commit replaces wc_clean() with sanitize_title(). This should be enough for security purposes and should not cause any issues with non-ASCII characters.
2020-09-08 16:00:56 -03:00
Ron Rennick 8fe3bcb90e rebase to current master 2020-08-28 10:59:43 -03:00