Home / Admin / Customize Gift Card Code
Duplicate Snippet

Embed Snippet on Your Site

Customize Gift Card Code

Code Preview
php
<?php
/* Customize the generated Gift Card Code */
function agcfw_change_prefix() {
    return array(
        'characters' => 'ABCDEFGHJKMNPQRSTUVWXYZ23456789', // Defines the characters used in the coupon code
        'length' => 10, // Sets the length of the generated code to 10 characters
        'prefix' => 'new-', // Adds 'new-' as the prefix for every coupon code (can be changed)
        'suffix' => '', // No suffix applied to the coupon code
    );
}
add_filter('agcfw_generate_code_settings', 'agcfw_change_prefix'); // Applies the filter to modify coupon generation settings

Comments

Add a Comment