WooPOS Gift Cards for WooCommerce 2.7 has 24 actions and 52 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 WooPOS Gift Cards for WooCommerce fires an action
add_action( 'wooposgc_woocommerce_after_save', function( $post_id ) {
// Your code runs here.
}, 10, 1 );
// Change a value WooPOS Gift Cards for WooCommerce is about to use
add_filter( 'wooposgc_change_add_to_cart_button', function( $link, $post ) {
// Change $link here.
return $link;
}, 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
-
/** * Filter whether an object is trashable. */ apply_filters( "woocommerce_rest_{$this->post_type}_object_trashable", $supports_trash, $object ); -
/** * Fires after a single object is deleted or trashed via the REST API. */ do_action( "woocommerce_rest_delete_{$this->post_type}_object", $object, $response, $request ); -
/** * Fires after a single object is created or updated via the REST API. */ do_action( "woocommerce_rest_insert_{$this->post_type}_object", $object, $request, true ); -
/** * Filter the data for a response. */ apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request ); -
do_action( 'wooposgc_woocommerce_after_save', $post_id ); -
do_action( 'wooposgc_add_more_options' ); -
apply_filters( 'wooposgc_change_add_to_cart_button', $link, $post ); -
apply_filters( 'wooposgc_check_giftcard', $return ); -
apply_filters( 'wooposgc_convert_current_to_default', $payment ); -
apply_filters( 'wooposgc_giftcard_data', $giftcard_data, $_POST ); -
apply_filters( 'wooposgc_other_validations', $passed, $product_id, $quantity ); -
do_action( 'wooposgc_woocommerce_options' ); -
do_action( 'wooposgc_woocommerce_options_after_description' ); -
do_action( 'wooposgc_woocommerce_options_after_personalize', $giftValue ); -
do_action( 'wooposgc_woocommerce_options_after_sender' ); -
do_action( 'wooposgc_woocommerce_options_before_personalize' ); -
do_action( 'wooposgc_woocommerce_options_before_sender' ); -
apply_filters( 'get_giftcard_settings', $options, $current_section ); -
apply_filters( 'woocommerce_add_section_giftcard', array( '' => __( 'Gift Card Options', 'wooposgc' ) ) ); -
apply_filters( 'woocommerce_cart_needs_shipping', $needs_shipping ); -
apply_filters( 'woocommerce_checkout_giftcard_message', __( 'Have a giftcard?', 'wooposgc' ) . ' <a href="#" class="showgiftcard">' . __( 'Click here to enter your code', 'wooposgc' ) . '</a>' ); -
apply_filters( 'woocommerce_email_subject_gift_card', sprintf( '[%s] %s', $blogname, __( 'Gift Card Information', 'wooposgc' ) ), $post->post_title ); -
apply_filters( 'woocommerce_gateway_icon', $icon_html . $what_is_paypal, $this->id ); -
apply_filters( "woocommerce_get_sections_{$this->id}", $sections ); -
apply_filters( 'woocommerce_isc_icon', '' ); -
do_action( 'woocommerce_product_options_giftcard_data' ); -
apply_filters( "woocommerce_rest_pre_insert_{$this->post_type}_object", $object, $request, $creating ); -
do_action( 'woocommerce_rest_set_order_item', $item, $posted ); -
do_action( 'wooposgc_add_other_giftcard_options', $post_id, $post ); -
do_action( 'wooposgc_add_updates' ); -
do_action( 'wooposgc_after_cart_form' ); -
do_action( 'wooposgc_after_checkout_form' ); -
do_action( 'wooposgc_after_product_fields', $post->ID ); -
do_action( 'wooposgc_after_remaining_balance', $theIDNum, $theBalance[$key] ); -
do_action( 'wooposgc_before_all_giftcard_fields', $post ); -
do_action( 'wooposgc_before_cart_form' ); -
do_action( 'wooposgc_before_checkout_form' ); -
do_action( 'wooposgc_before_product_fields' ); -
apply_filters( 'wooposgc_convert_to_isc', $return ); -
apply_filters( 'wooposgc_customize_number', $giftCardNumber ); -
apply_filters( 'wooposgc_email_content_return', $return, $giftCard ); -
apply_filters( 'wooposgc_emailContents', $theMessage ); -
apply_filters( 'wooposgc_emailSubject', $email_heading ); -
apply_filters( 'wooposgc_extra_check', $product_type_options ); -
apply_filters( 'wooposgc_generate_number', $randomNumber ); -
apply_filters( 'wooposgc_get_custom_instructions', $instructions ); -
apply_filters( 'wooposgc_get_custom_message', $message ); -
apply_filters( 'wooposgc_get_giftcard_amount', $giftcard['amount'], $code_id ); -
apply_filters( 'wooposgc_get_giftcard_balance', $giftcard['balance'] ); -
apply_filters( 'wooposgc_get_giftcard_expiration', $giftcard['expiry_date'], $code_id ); -
apply_filters( 'wooposgc_get_giftcard_from', $giftcard['from'], $code_id ); -
apply_filters( 'wooposgc_get_giftcard_fromEmail', $giftcard['fromEmail'], $code_id ); -
apply_filters( 'wooposgc_get_giftcard_info', $giftcard, $code_id ); -
apply_filters( 'wooposgc_get_giftcard_note', $giftcard['note'], $code_id ); -
apply_filters( 'wooposgc_get_giftcard_number', $giftcardNumber, $code_id ); -
apply_filters( 'wooposgc_get_giftcard_to', $giftcard['to'], $code_id ); -
apply_filters( 'wooposgc_get_giftcard_toEmail', $giftcard['toEmail'], $code_id ); -
apply_filters( 'wooposgc_get_order_card_balance', $balance, $order_id ); -
apply_filters( 'wooposgc_get_order_card_ids', $ids, $order_id ); -
apply_filters( 'wooposgc_get_order_card_number', $number, $order_id ); -
apply_filters( 'wooposgc_get_order_card_numbers', $numbers, $order_id ); -
apply_filters( 'wooposgc_get_order_card_payment', $payment, $order_id ); -
apply_filters( 'wooposgc_get_order_refund_status', $refunded, $order_id ); -
apply_filters( 'wooposgc_giftcard_auto_settings', array( array( 'name' => __( 'Time to Expire', 'wooposgc' ), 'desc' => __( 'Select the number of days you would like cards to be valid for.', 'wooposgc' ), 'id' => 'wooposgc_auto_defaultExpiry', 'std' => '0', 'default' => '0', 'type' => 'text', 'desc_tip' => true, ), array( 'name' => __( 'Send', 'wooposgc' ), 'desc' => __( 'Select when you would like the card sent. Example: If you want the card ... ); -
apply_filters( 'wooposgc_giftcard_columns', $new_columns ); -
apply_filters( 'wooposgc_giftcard_number_settings', array( array( 'name' => __( 'Before Number', 'wooposgc' ), 'desc' => __( 'This is the value that will display before a gift card number.', 'wooposgc' ), 'id' => 'wooposgc_cn_preNum', 'std' => '', 'default' => '', 'type' => 'text', 'desc_tip' => true, ), array( 'name' => __( 'After Number', 'wooposgc' ), 'desc' => __( 'This is the value that will display after a gift card number.', 'wooposgc' ),... ); -
apply_filters( 'wooposgc_giftcard_price_settings', array( array( 'name' => __( 'Minimum Price', 'wooposgc' ), 'desc' => __( 'This is the smallest value gift card that you will allow.', 'wooposgc' ), 'id' => 'wooposgc_auto_min', 'std' => '', 'default' => '', 'type' => 'number', 'desc_tip' => true, ), array( 'name' => __( 'Maximum Price', 'wooposgc' ), 'desc' => __( 'This is the smallest value gift card that you will allow. (No max value? Leave f... ); -
apply_filters( 'wooposgc_giftcard_settings', array( array( 'title' => __( 'Processing Options', 'wooposgc' ), 'type' => 'title', 'id' => 'giftcard_processing_options_title' ), array( 'title' => __( 'Display on Cart?', 'wooposgc' ), 'desc' => __( 'Display the giftcard form on the cart page.', 'wooposgc' ), 'id' => 'wooposgc_enable_giftcard_cartpage', 'default' => 'yes', 'type' => 'checkbox', 'autoload' => false ), array( 'title' => __( 'Di... ); -
do_action( 'wooposgc_post_update_giftcard_status', $code_id, $new_status, $giftcard->post_status ); -
do_action( 'wooposgc_pre_update_giftcard_status', $code_id, $new_status, $giftcard->post_status ); -
apply_filters( 'wooposgc_preventAddToCart', $return, $id ); -
apply_filters( 'wooposgc_regen_number', $this->generateNumber() ); -
apply_filters( 'wooposgc_send_giftcard_to_paypal', $paypal_args ); -
apply_filters( 'wooposgc_setting_classes', $settings ); -
apply_filters( 'wooposgc_show_isc', $return ); -
apply_filters( 'wooposgc_uniqueID', $cart_item_data, $product_id );
Generated from WooPOS Gift Cards 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: