Commit Graph

135 Commits

Author SHA1 Message Date
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 52a2ce0300
Move nonce prepartion into core utilizing filter hook from WC Admin 2021-01-20 07:06:23 -08: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
Ron Rennick 43051a0950 update deprecation versions to 4.6.0 2020-09-18 13:16:46 -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
Ron Rennick 72df8aecfa updated deprecated version to 4.5.0 2020-08-13 14:46:12 -03:00
Ron Rennick aaae319a65 deprecate wc-setup 2020-06-23 15:29:58 -03:00
Vedanshu Jain 6564847802
Merge pull request #26454 from woocommerce/enhancement/verify-db
Add `verify_base_db` method to check if all base tables are present.
2020-06-05 15:15:39 +05:30
Claudio Sanches 2acc24f489 Added missing trailing slash 2020-05-26 17:23:37 -03:00
Claudio Sanches a240798362 Don't allow redirection while checking for uploads directory 2020-05-25 10:31:58 -03:00
vedanshujain f5afddd4c9 Add support for notices 2020-05-22 18:32:03 +05:30
Claudio Sanches 8fecbcf9bf Make safe 2020-05-06 21:49:20 -03:00
Claudio Sanches 191bc7f134 Check if uploads/woocommerce_uploads is protected 2020-05-06 21:41:04 -03:00
Claudio Sanches d6a17aad4e Request is internal 2020-05-05 14:05:53 -03:00
Claudio Sanches d8b8601601 Updated uploads directory check and saved results on transients 2020-05-05 14:03:12 -03:00
Claudio Sanches fdea6de347 Check for user meta data first 2020-05-04 22:12:24 -03:00
Claudio Sanches 54625f9712 Fixed check 2020-05-04 22:11:56 -03:00
Claudio Sanches 15f71015e6 Improved method naming 2020-05-04 22:11:02 -03:00
Claudio Sanches 67a0a68689 Fixed uploads_directory_is_public trigger 2020-04-17 18:39:15 -03:00
Claudio Sanches 0eae470c0f Added notice to check if uploads directoy is public 2020-04-17 18:21:29 -03:00
vedanshujain 9ac9970a77 Also display on selected pages outside of wc-admin 2020-03-05 17:07:10 +05:30
vedanshujain 4b3977868b Display only wc-admin notices when enabled to avoid duplicate notices 2020-03-05 16:53:10 +05:30
Peter Fabian 992c6538dc Force the saving of notices only for the 'update' notice to prevent performance problems. 2020-02-25 14:58:02 +01:00
Peter Fabian 7ec65a1b35 Added the WC Admin enabled db update notice. 2020-02-23 21:59:03 +01:00
vedanshujain 707a9bf9a0 Bump versions 2020-02-07 17:54:54 +05:30
vedanshujain b29219969c Addressed code review comments 2020-02-07 17:54:54 +05:30
vedanshujain dc060fe700 Add notice when "redirect only" download method is selected.
This download is insecure as it reveals the original file location. We will try to nudge user to use any of the other download method instead.
2020-02-07 17:54:54 +05:30
Peter Fabian 4f485a14de Added explanation comments. 2020-02-07 12:58:31 +01:00
Peter Fabian 5fc2e8fba9 Only skip the store_notices during new install in AS. 2020-02-07 11:06:35 +01:00
Peter Fabian 4c4f9f1164 Don't save notices when running from AS. 2020-02-07 00:21:03 +01:00
Christopher Allford 57734ca8ce Merge branch 'master' into refactor/add-jetpack-constants 2020-02-04 14:36:35 -08:00
Christopher Allford 1d1413b4ee Replaced direct access of many constants with the Constants library 2020-01-31 22:18:47 -08:00
Timmy Crawford 9bfc7db3fb Remove wc-admin install nudge. 2020-01-27 09:24:46 -08:00
Rodrigo Primo 8489d1bd33 Merge branch 'master' into fix/25394 2020-01-16 16:35:43 -03:00
Claudio Sanches 5bafac3012 Improved maxmind_missing_license_key_notice logic 2020-01-14 23:32:55 -03:00
Rodrigo Primo 23e1abe1dc Fix typo in php docblock 2020-01-14 16:45:57 -03:00
Claudio Sanches 978c5b5fb9 Apply woocommerce_maxmind_geolocation_display_notices filter in notices class 2020-01-14 15:22:53 -03:00
Joshua Flowers 902e1cc184 Check for the WooCommerce Admin class before adding notice 2020-01-13 17:43:27 +08:00
Claudio Sanches c3abe8ac65 Added missing license key notice and triggers 2020-01-10 15:07:05 -03:00
vedanshujain 451139e68e Use MIN_PHP and MIN_WP constants in PHP_MIN_REQUIREMENT value so that we don't have to change it everytime. 2019-10-15 16:07:03 +05:30
vedanshujain ec490409ea Refactor to use constant so that we have easy way to reset admin notice version 2019-10-15 16:07:02 +05:30
Peter Fabian 6727fdba62 Updated constants' names to better reflect their usage. 2019-07-02 18:44:43 +02:00
Gerhard Potgieter 698625ce1d WP & PHP Upgrade Notices (#23975)
This commit introduces a banner that notifies and prompts users to upgrade their WordPress and/or PHP if they are outdated and not part of the minimum required versions going into WooCommerce 3.7.

* Add backward compatible function wp_check_php_version for sites running WP version smaller than 5.1

* Refactor some messaging, move widget to top of WC dashboard widgets, add buttons linking out to WP pages with instructions.

* Add missing variables for adding nag class

* Add styling to dashboard widget

* Rework css to use exclamation instead

* Clean up widget, make sure no widget is registered when dismissed. Add banner that links to widget and make it dismissable.

* Update constant to reflect minimum requirements.

* Don't show banner. Fix undefined variable.

* Remove dashboard widget

* Update banner link to docs site

* Add link to docs page where instructions live for updating

* Change button text

* Add UTM params to docs link

* Moved the msg logic from template to php file.

* Bail out early when PHP and WP versions are ok.

* Added missing translation functiog

* Extracted notice function from reset_admin_notices.

To follow suit with other similar functions in the file.

* Synchronize fetching of WP version.

* Removed unused functions.

* Corrected indent.

* Reduce number of variables and fixed coding standards

* Updated wording of the notice.
2019-06-26 14:09:20 -03:00
Timmy Crawford 01f1749684 Change version compare. 2019-05-17 13:53:38 -07:00
Timmy Crawford 43cd7dc04c Add wc-admin notice. 2019-05-17 13:53:37 -07:00
Mike Jolley 91084f3e28 Add todo for legacy shipping notice 2019-04-10 11:23:04 +01:00
Mike Jolley e6c60dd6c2 Show notice when regeneration is taking place with link to AS 2019-03-13 12:25:20 +00:00
Mike Jolley b4cfef95a2 Stop calling notice file 2019-03-13 10:40:38 +00:00
Mike Jolley 6f4eeef2fe Move deprecated notices to bottom of class and add deprecated tag 2019-03-13 10:37:30 +00:00