Product Icon

Gift Cards for WooCommerce

Trending
Offer prepaid digital gift cards that customers can redeem online.

Gift Card Sending on Order Status

Please refer to reference #5792245.

An order is placed containing a physical item as well as a gift card and the customer selects direct bank deposit.
Woocommerce puts order status as “On Hold”.
When the transfer has been confirmed, we put the order status into “Processing” status.
Gift card is not yet sent because woocommerce cannot tell Gift Crads plugin that money has been received.
GIft card will only be sent once physical item has been delivered and order status is set to “Complete”.

Therefore, the customer does not receive their gift card immediately, but ratehr has to wait a few days until their physical item is delivered.

In this scenario of Direct Bank Transfer payment option + Physical product, we would like for the gift card to be sent when the order status is set to “Processing”.

Author

ryu007za

Current Status

Completed

Last updated: February 13, 2023

1 comment

Log in to comment on this feature request.

  1. jaskyt8 says:
    Product developer January 30, 2025 10:52 am

    Hey there,

    Thank you for getting in touch!

    By default, Gift Card codes are generated when:

    – the order is set to Completed or;
    – the order has been successfully paid for.

    To generate gift card codes while the order is in Processing status, use the following snippet:

    add_action( ‘init’, ‘sw_gc_create_gift_cards_on_processing’ );

    function sw_gc_create_gift_cards_on_processing() {
    add_action( ‘woocommerce_order_status_processing’, array( ‘WC_GC_Gift_Card_Product’, ‘create_order_gift_cards’ ), 10, 2 );
    }

    Note: Please use this snippet only if you are certain that the payment for an order is complete when it is moved to the Processing status.

    To install this snippet, you may use the free Code Snippets plugin: https://wordpress.org/plugins/code-snippets/.