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
Rodrigo Primo
6861fdab5d
Update @version in which a filter was added
2020-10-08 17:03:09 -03:00
Jon Campbell
0fedb0db7a
Added filter for low stock notification emails ( #27819 )
...
* Adding new filter for low stock notification
* Update class-wc-emails.php
fixing whitespace
2020-10-08 17:02:09 -03:00
Néstor Soriano
e4b78cedbf
Merge pull request #27748 from woocommerce/remove-leftovers-from-improved-filtering-by-attribute-for-variations
...
Remove leftovers from the reverted improved filtering mechanism for variations
2020-10-08 15:45:09 +02:00
Rodrigo Primo
0771138604
Merge pull request #27707 from dd32/php8/warnings
...
PHP8 Warning: Change __wakeup() to a public method
2020-10-08 10:01:21 -03:00
Néstor Soriano
ab529835fa
Merge pull request #27840 from woocommerce/php8/fix-required-parameters-after-optional
...
[PHP 8] Convert optional-before-required parameters into required parameters
2020-10-08 14:22:52 +02:00
Vedanshu Jain
8a9fa0d27b
Merge pull request #27587 from om4james/fix/26847-rest-api-auth
...
Fix HTTP 401 `woocommerce_rest_cannot_view` `Sorry, you cannot list resources` REST API response
2020-10-08 16:32:03 +05:30
Nestor Soriano
b71f876cba
Reintroduce the dependency injection related code.
...
After the League's Container package has been reintroduced, all the
code that implements the dependency injection mechanism in woocommerce
can be brought back as well.
2020-10-08 09:28:05 +02:00
James Collins
79dd557b77
Return true to indicate that authentication using this method was successful
2020-10-08 09:33:33 +08:00
Ron Rennick
577494796c
Merge pull request #27736 from woocommerce/fix/27681
...
Update taxonomy template file names to `-`
2020-10-07 15:23:11 -03:00
Ron Rennick
67a54b3aa3
Merge pull request #27289 from woocommerce/fix/27222
...
use first gallery image on single product when image not assigned
2020-10-07 15:06:30 -03: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
Ron Rennick
ab4a46e32e
Merge pull request #27299 from woocommerce/fix/27116
...
allow variation image to be removed via REST API
2020-10-05 09:33:50 -03:00
Nestor Soriano
7485b9165f
Convert optional-before-required arguments to required.
...
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-02 09:45:09 +02:00
Nestor Soriano
53d33457e3
Fix code style/sniffer errors in a few files.
2020-10-02 09:34:09 +02:00
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
Nestor Soriano
b1e81d02da
Fix code style/sniffer errors in a few files.
2020-10-01 11:08:51 +02:00
Jonathan Sadowski
e540b4820e
Rename maybe_enable_setup_wizard to maybe_set_activation_transients
2020-09-30 17:27:43 -05:00
Jonathan Sadowski
83238ec1d7
Move maybe_enable_setup_wizard abode update_wc_version so new install is detected
2020-09-30 17:01:43 -05:00
Jonathan Sadowski
95755cb59d
Update the activation transient to only get added on new installs
2020-09-30 16:00:45 -05:00
Joshua Flowers
048c43a37f
Add back in activation transient to redirect on install
2020-09-29 14:25:15 -04:00
Ron Rennick
802b364b05
Merge branch 'master' into fix/27681
2020-09-28 16:17:51 -03:00
Nestor Soriano
f419335cdf
Remove the migration to delete variation term relationships.
2020-09-28 09:35:13 +02:00
Nestor Soriano
849a64d67c
Add a data migration for removing term relationships related to variations
...
After the code that creates term relationships for variations has been
removed, a data migration is required to remove all the no longer needed
term relationships.
Also, the original migration that backfilled those relationships has
been removed (the migration function is kept but with an empty body).
2020-09-22 16:31:38 +02:00
Nestor Soriano
a94ea7f51f
Remove logic for storage of attribute terms for variations
...
A mechanism for improved filtering by attribute for variations was
introduced some time ago. This mechanism implied maintaining term
relationships for variations, where the terms were the attributes
that defined the variation.
The mechanism was reverted because it was complex and presented many
issues, but the code that created those term relationships was kept.
This pull request removes that code and the associated unit tests.
2020-09-22 16:31:06 +02:00
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
James Collins
ce31260452
Return early if another plugin has already declared an auth failure
2020-09-22 16:17:35 +08:00
Claudio Sanches
3391d8c0b0
Merge pull request #27718 from woocommerce/bump-versions-to-4.7.0
...
Bump WC version to 4.7.0
2020-09-21 16:21:09 -03:00
Ron Rennick
6a36bce334
tweak logic to use `woocommerce/*-*` templates in theme folder
2020-09-21 14:12:22 -03:00
Ron Rennick
bb6ded857d
phpcs fixes
2020-09-21 13:34:14 -03:00
Ron Rennick
57fa6aff83
update taxonomy template names from `_` to `-`
2020-09-21 13:30:29 -03:00
Rodrigo Primo
6a641c4b1d
Bump WC version to 4.7.0
2020-09-19 15:24:12 -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
9ae1ba92c6
remove WC_Admin_Setup_Wizard_Tracking from tracking classes
2020-09-18 15:26:18 -03:00
Ron Rennick
0735ed9f40
Merge branch 'fix/26173' of github.com:woocommerce/woocommerce into fix/26173
2020-09-18 15:23:08 -03:00
Ron Rennick
4b3b40d42e
address feedback
2020-09-18 15:22:24 -03:00
Rodrigo Primo
f3191907d9
Add missing line break
2020-09-18 14:25:25 -03:00
Ron Rennick
43051a0950
update deprecation versions to 4.6.0
2020-09-18 13:16:46 -03:00
Ron Rennick
cca97599d7
only automatically create pages on new install
2020-09-18 13:10:11 -03:00
Ron Rennick
9915a5b142
merge master
2020-09-18 12:53:28 -03:00
Ron Rennick
6630f3fdba
remove class accidentally added to PR
2020-09-18 12:41:57 -03:00
Rodrigo Primo
d99053dbed
Update version in @since tag of the woocommerce_should_send_no_stock_notification filter
2020-09-18 12:08:36 -03:00
Rodrigo Primo
8be6dc5b96
Merge pull request #27634 from jondcampbell/master
...
Added filter for no stock notification emails
2020-09-18 12:07:04 -03:00
Rodrigo Primo
60d6510cb0
Merge pull request #27685 from woocommerce/add/wp-env-type-to-wc-tracker
...
Added environment type var to WC tracker.
2020-09-18 11:30:35 -03:00
Rodrigo Primo
197e8d274c
Merge pull request #27616 from woocommerce/fix/26960
...
Paypal gateway: protect code against a fatal error if WooCommerce is unable to communicate with PayPal
2020-09-18 09:34:57 -03:00
Peter Fabian
ed9c1e2f93
Update includes/class-wc-tracker.php
...
Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2020-09-18 14:30:39 +02:00
Dion Hulse
9440ec3570
Change __wakeup() to a public method to avoid PHP8 warning.
2020-09-18 07:55:26 +00: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