add gclid as description
-
Hi,
I have a form in the bottom of this page (not the button on top), where I send a donation.
My goal is to change Stripe description for something like “Petit Magicien Conversion GAds | gclid=test213test”.
For this, I used this following function (in function.php) :
function stripe_custom_description($description) {
// Vérifier si le gclid est présent dans l'URL
if (isset($_GET['gclid']) && !empty($_GET['gclid'])) {
$gclid = sanitize_text_field($_GET['gclid']);
// Définir une nouvelle description seulement si le gclid existe
$description = "Petit Magicien Conversion GAds | gclid=" . $gclid;
}
// Retourner la description (modifiée ou originale)
return $description;
}
add_filter('give_payment_gateway_donation_summary', 'stripe_custom_description', 10, 1);Even though there is a ?gclid=test213test in the URL, the end description in Stripe is not changing.
What can I do to solve this?
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘add gclid as description’ is closed to new replies.