The Gift Card for WooCommerce plugin provides three powerful action hooks within the gift card form template. These hooks give developers full control to extend or modify the form by injecting custom fields or content without editing the core plugin files.
🧩 Available Actions
1. wodgc_before_receiver_details_fields
Location:
Inside the main form block, before the “Receiver Name” field.
Purpose:
Use this hook to insert additional form fields or content before the predefined receiver details (e.g., adding a gift occasion dropdown, delivery date picker, etc.).
Hook Registration:
add_action( 'wodgc_before_receiver_details_fields', 'wodgc_before_receiver_details_fields_callback' );
Function Example:
function wodgc_before_receiver_details_fields_callback() {
// Add your custom field logic here
}
2. wodgc_after_receiver_email_field
Location:
After the “Receiver Email” field, just before the “Greeting Message” textarea.
Purpose:
Use this hook to include informational content or extra form fields related to the receiver’s details (e.g., phone number, company name, etc.).
Hook Registration:
add_action( 'wodgc_after_receiver_email_field', 'wodgc_after_receiver_email_field_callback' );
Function Example:
function wodgc_after_receiver_email_field_callback() {
// Add your custom field logic here
}
3. wodgc_schedule_giftcard_email
Location:
After the “Greeting Message” textarea field, just before the “Sender Name” field.
Purpose:
Use this hook to schedule the gift card email for future delivery or modify the logic that controls when and how the gift card email is sent (e.g., scheduling for a selected delivery date).
Hook Registration:
add_action( 'wodgc_schedule_giftcard_email', 'wodgc_schedule_giftcard_email_callback' );
Function Example:
function wodgc_schedule_giftcard_email_callback() {
// Add your custom field logic here
}