sprucejoy / cookie-consent-autoblock-gdpr

Make your site comply with the GDPR and CCPA with 1-line js code.
https://sprucejoy.com/resources/cookie-consent-gdpr/
MIT License
20 stars 2 forks source link

[BUG]Cookie banner text not changed #4

Open jrswebdesign opened 2 years ago

jrswebdesign commented 2 years ago

Describe the bug Cookie banner text can not be changed

To Reproduce Steps to reproduce the behavior:

  1. Go to 'the cookie banner plugin'
  2. Click on 'the field for the cookie banner field text'
  3. Click save
  4. After refresh it is still the same

Expected behavior A change in the text of the cookiebanner.

Desktop (please complete the following information):

BrunoIvanAmadori commented 2 years ago

Hey! currently I don't have time to close the pull request, but I found that the problem is in the file "class-wp-sprucejoy-admin-tab-options.php" in the line 178.

It says: update_option('wpsprucejoy_message', ( isset( $_POST['wpsprucejoy_enable_cwpsprucejoy_messageookie_bar'] ) ) ? sanitize_text_field( $_POST[ 'wpsprucejoy_message' ] ) : '');

But it should say... update_option('wpsprucejoy_message', (isset($_POST['wpsprucejoy_message'])) ? sanitize_text_field($_POST['wpsprucejoy_message']) : '');

After changing this, the update works.