Prefix or suffix to the generated numbers

You can add a prefix or suffix to the randomly generated card numbers by taking the following steps:

1. Install the free Code Snippets plugin: https://wordpress.org/plugins/code-snippets/
2. Create a new Snippet with the following code:

function custom_pw_gift_cards_random_card_number( $card_number ) {
    return 'PP' . $card_number;
}
add_filter( 'pw_gift_cards_random_card_number', 'custom_pw_gift_cards_random_card_number' );

Note: if you prefer, add the code to your functions.php rather than using Code Snippets.

To customize the randomly generated number format, follow the steps in this guide:
https://www.pimwick.com/pw-faq/change-the-generated-number-format/

Skip to content