Gift Vouchers for WooCommerce 1.1.7 has 20 actions and 44 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Gift Vouchers for WooCommerce fires an action
add_action( 'wgv_new_voucher_note', function( $new_voucher_note_args ) {
// Your code runs here.
}, 10, 1 );
// Change a value Gift Vouchers for WooCommerce is about to use
add_filter( 'wgv_new_voucher_note_data', function( $compact, $arg2 ) {
// Change $compact here.
return $compact;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the email subject for this voucher notification. */ apply_filters( "woocommerce_email_subject_{$this->id}", $this->format_string($subject), $this->object ); -
/** * Fires after a new voucher note is added */ do_action( 'wgv_new_voucher_note', $new_voucher_note_args ); -
/** * Filters new voucher note data */ apply_filters( 'wgv_new_voucher_note_data', compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'voucher_status', 'comment_agent', 'comment_type', 'comment_parent', 'comment_approved'), array('voucher_id' => $post->id) ); -
/** * Filters vouchers font family options. */ apply_filters( 'wgv_product_vouchers_font_family_options', array_merge( $default_fonts, $google_fonts ) ); -
/** * Filter the product name. */ apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); -
/** * Voucher purchaser html email */ do_action( 'woocommerce_email_header', $email_heading, $email ); -
/** * Filter My Account > Vouchers columns. */ apply_filters( 'wgv_product_vouchers_account_vouchers_columns', array( 'voucher-number' => esc_html__( 'Voucher Code', 'woocommerce-gift-vouchers' ), 'voucher-pin' => esc_html__( 'Pin Code', 'woocommerce-gift-vouchers' ), 'voucher-expires' => esc_html__( 'Expires', 'woocommerce-gift-vouchers' ), 'voucher-remaining' => esc_html__( 'Remaining Value', 'woocommerce-gift-vouchers' ), 'voucher-actions' => esc_html__( 'Download Gift Voucher', 'woocommerce-gift-vou... ); -
/** * Filters the available font families and their URLs. */ apply_filters( 'wgv_product_vouchers_available_google_fonts', [ 'Noto Sans', 'Roboto', 'Open Sans', 'Lato', 'Montserrat', 'Playfair Display', 'Archivo Narrow', 'Poppins', 'Raleway', 'Merriweather', ] ); -
/** * Filters voucher field settings CSS configuration */ apply_filters( 'wgv_product_vouchers_field_settings_css_config', $css_config ); -
/** * Fires after all vouchers for an order have been marked redeemed */ do_action( 'wgv_product_vouchers_order_redeemed', $order ); -
/** * Fires when a gift voucher is saved/updated from admin */ do_action( 'wgv_product_vouchers_process_voucher_meta', $post_id, $post ); -
/** * Filters the flag that may hide the tax label from total regardless of * WooCommerce display tax setting. */ apply_filters( 'wgv_product_vouchers_should_hide_tax_label_from_cart_total', $should_hide_tax_label, $this ); -
/** * Filter whether voucher should be redeemed. */ apply_filters( 'wgv_product_vouchers_should_redeem_scanned_voucher', true, $voucher, $barcode_value ); -
/** * Filters the found voucher. */ apply_filters( 'wgv_product_vouchers_voucher', new \WGVWWT_Voucher( $post ), $post ); -
/** * Filters Customizer controls for a voucher field */ apply_filters( 'wgv_product_vouchers_voucher_field_controls', $controls, $field_id, $data_type ); -
/** * Filters default Customizer controls for a voucher field */ apply_filters( 'wgv_product_vouchers_voucher_field_default_controls', $controls, $data_type ); -
/** * Filters default settings for a voucher field */ apply_filters( 'wgv_product_vouchers_voucher_field_default_settings', $settings, $data_type ); -
/** * Filters settings for a voucher field */ apply_filters( 'wgv_product_vouchers_voucher_field_settings', $settings, $field_id, $data_type ); -
/** * Filters voucher fields */ apply_filters( 'wgv_product_vouchers_voucher_fields', $fields ); -
/** * Filters whether a voucher has a status or not */ apply_filters( 'wgv_product_vouchers_voucher_has_status', ( is_array( $status ) && in_array( $this->get_status(), $status, true ) ) || $this->get_status() === $status, $this, $status ); -
/** * Fires upon redeeming a voucher. */ do_action( 'wgv_product_vouchers_voucher_redeemed', $voucher ); -
/** * Filters the found voucher template */ apply_filters( 'wgv_product_vouchers_voucher_template', new \WGVWWT_Voucher_Template( $post ), $post ); -
/** * Cart Page template */ do_action( 'woocommerce_before_cart' ); -
/** * Cart collaterals hook. */ do_action( 'woocommerce_cart_collaterals' ); -
/** * Trigger download via one of the methods. WC_Download_Handler will take over * from here */ do_action( "woocommerce_download_file_{$file_download_method}", $file_url, $filename ); -
woocommerce_order_recalculate_coupons_coupon_object
filter Used by 3 plugins β Copy link Customise this hook/** * this filter is documented in \WC_Order::recalculate_coupons() * */ apply_filters( 'woocommerce_order_recalculate_coupons_coupon_object', $coupon_object, $coupon_code, $coupon_item, $order ); -
woocommerce_pdf_product_vouchers_resend_voucher_emails_available
filter Copy link Customise this hook/** * Filter the emails avilable for resending in voucher actions meta box */ apply_filters( 'woocommerce_pdf_product_vouchers_resend_voucher_emails_available', array('wgv_product_vouchers_voucher_recipient', 'wgv_product_vouchers_voucher_purchaser') ); -
/** * Filter voucher actions in voucher action meta box */ apply_filters( 'woocommerce_pdf_product_vouchers_voucher_actions', array() ); -
/** * Triggered at the beginning of the voucher actions meta box */ do_action( 'woocommerce_pdf_product_vouchers_voucher_actions_start', $post->ID ); -
apply_filters( "woocommerce_email_heading_{$this->id}", $this->format_string($this->heading), $this->object ); -
apply_filters( 'active_plugins', get_option( 'active_plugins' ) ); -
apply_filters( 'plugin_locale', get_locale(), 'woocommerce-gift-vouchers' ); -
apply_filters( 'wgv_languages_directory', $wgv_lang_dir ); -
apply_filters( 'wgv_product_vouchers_voucher_image_dpi', $dpi, $this ); -
apply_filters( 'wgv_product_vouchers_voucher_note_class', array('note'), $gift_voucher_note, $post->ID ); -
apply_filters( 'wgv_product_vouchers_voucher_template_additional_image_id', $image_id, $this ); -
apply_filters( 'wgv_product_vouchers_voucher_template_image_id', $image_id, $this ); -
apply_filters( 'wgv_product_vouchers_voucher_template_logo_image_id', $logo_id, $this ); -
do_action( 'woocommerce_after_cart' ); -
do_action( 'woocommerce_after_cart_contents' ); -
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key ); -
do_action( 'woocommerce_after_cart_table' ); -
do_action( 'woocommerce_before_cart_collaterals' ); -
do_action( 'woocommerce_before_cart_contents' ); -
do_action( 'woocommerce_before_cart_table' ); -
do_action( 'woocommerce_cart_actions' ); -
do_action( 'woocommerce_cart_contents' ); -
do_action( 'woocommerce_cart_coupon' ); -
woocommerce_cart_item_backorder_notification
filter Used by 49 plugins β Copy link Customise this hookapply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ); -
apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); -
apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>', esc_url( wc_get_cart_remove_url( $cart_item_key ) ), esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ), esc_attr( $product_id ), esc_attr( $_product->get_sku() ) ), $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '</a>' ); -
woocommerce_product_variation_title_include_attributes
filter Used by 5 plugins β Copy link Customise this hookapply_filters( 'woocommerce_product_variation_title_include_attributes', true, $product ); -
apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) );
Generated from Gift Vouchers for WooCommerce's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and weβll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the pluginβs own hooks.
- Code written against the pluginβs actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2β3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the pluginβs files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3β7 business days
Choose thisNot sure which fits? Describe what you need and weβll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: