Update: FlipperCode has addressed the dependency chain, this method is no longer necessary when using Complianz version 6.6.0 or higher. Activating the WP Google Map Plugin integration under Complianz > Integrations > Plugins will suffice.
By following these steps, you’ll be able to use the built-in GDPR module of the Flippercode WP Maps (Pro) plugin to block the Google Map from loading before obtaining consent, and load it when consent has been obtained in Complianz.
- Navigate to the WP Maps Pro plugin settings by navigating to “WP Maps Pro” in the WordPress Dashboard menu. Select “Plugin Settings” and find the “Cookies Acceptance” section. Enable the “Cookie Acceptance” checkbox to activate the cookie consent feature in the WP Maps Pro plugin.
- Paste the following code in the “No Map notice” field that appears:
- Now, create a new file, copy the below code to that new file and save it as a new .php file.
- Upload your newly created .php file to the folder /wp-content/mu-plugins/.
Example
The result will be a Google Map that is blocked before obtaining consent.