Change the example gift card number

Note: this requires the PW Gift Cards Pro version.

By default, the example gift card number shown in the preview is 1234-WXYZ-5678-ABCD. To change this to something else, follow these steps:

1. Download the free Code Snippets plugin: https://wordpress.org/plugins/code-snippets/
2. Create a Snippet with the following code (you can optionally add this to your functions.php if you’re more familiar with that process instead.)

function custom_pwgc_example_gift_card_number( $number ) {
    $number = '1234-WXYZ-5678-ABCD';
    
    return $number;
}
add_action( 'pwgc_example_gift_card_number', 'custom_pwgc_example_gift_card_number' );
Skip to content