File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,17 +297,19 @@ public function gluonGetUserConsent(): string|false {
297297 }
298298
299299 /**
300- * Filter callback to set the consent type for this plugin .
300+ * Filter callback to provide a default consent type.
301301 *
302- * Sets the consent mechanism to 'optin', meaning users must actively
303- * consent before non-essential cookies or tracking is activated.
302+ * Only sets the consent type to 'optin' when no site-wide type has been
303+ * configured yet. If another plugin or the site owner has already set a
304+ * consent type, that value is preserved unchanged — this plugin must not
305+ * override the global consent mechanism.
304306 *
305307 * @since 1.0.0
306- * @param string $type The current consent type.
307- * @return string The consent type: 'optin'.
308+ * @param string $type The current consent type set by the site or another plugin .
309+ * @return string The existing consent type, or 'optin' when none is set .
308310 */
309311 public function gluonSetConsentType ( string $ type ): string {
310- return 'optin ' ;
312+ return $ type ?: 'optin ' ;
311313 }
312314
313315 /**
You can’t perform that action at this time.
0 commit comments