Ultimate Gift Card for WooCommerce Developer Docs

“Ultimate Gift Card for WooCommerce Developer Docs” Documentation by “WP Plugin Experts”

Action Reference

woo_ugc_after_productinfo

This action runs after displaying product information on check gift card code page and can be used to display content just after the product information. This action includes three parameters $ugccodeid, $item_id, $order_id.

woo_ugc_after_ugcchekinfo

This action runs after displaying gift card information on check gift card code page and can be used to display content just after the gift card information. This action includes three parameters $ugccodeid, $item_id, $order_id.

woo_ugc_after_buyerinfo

This action runs after displaying buyer information on check gift card code page and can be used to display content just after the buyer information. This action includes three parameters $ugccodeid, $item_id, $order_id.

woo_ugc_after_orderinfo

This action runs after displaying order information on check gift card code page and can be used to display content just after the order information. This action includes three parameters $ugccodeid, $item_id, $order_id.

woo_ugc_redeemed_giftcard_code

This action runs after gift card code gets redeemed and can be used to implement any functionality after code gets redeemed. This action includes one parameter $ugccodeid.


Filter Reference

woo_ugc_edit_vendor_role

This filter can be used to add any role to work as a gift card vendor role. Adding new user role to gift card vendor role will allow all users of that role to access Gift Card pages. The filter includes one parameter, $roles, which is an array containing roles which you want assign vendor capability.

woo_ugc_giftcard_download_text

This filter can be used to change “View Gift Card” text. The filter includes two parameter, $download_text and $product_id.

woo_ugc_unlimited_code_pattern

This filter can be used to modify unlimited gift card code pattern. The filter includes one parameter, $ugccodes_args which is an array contain following items: buyername – display the buyer’s name. code_prefix – display the gift card code. order_id – display the order id. data_id – display the product / variation id.

woo_ugc_assigned_admin_roles

This filter can be used to add any user roles like Shop manager, Editor etc to allow check gift card code page and other gift card report pages. The filter includes one parameter, $roles, which is an array containing admin roles.Note: It is different then “woo_ugc_edit_vendor_role” filter, as from vendor role you can only redeem those gift cards which are assigned to him. But this filter allows users to redeem all gift card codes, as admin have access to all the gift card codes in the system.

woo_ugc_check_ugc_productinfo_fields

This filter can be used to remove product info section or add/delete any column in product info section on check gift card code page. The filter includes three parameters i.e. $product_info, $order_id, $giftcard_code.

woo_ugc_check_ugc_giftcardinfo_fields

This filter can be used to remove gift card info section or add/delete any column in gift card info section on check gift card code page. The filter includes three parameters i.e. $giftcard_info, $order_id, $giftcard_code.

woo_ugc_check_ugc_buyerinfo_fields

This filter can be used to remove buyer info section or add/delete any column in buyer info section on check gift card code page. The filter includes three parameters i.e. $buyer_info, $order_id, $giftcard_code.

woo_ugc_check_ugc_orderinfo_fields

This filter can be used to remove order info section or add/delete any column in order info section on check gift card code page. The filter includes three parameters i.e. $order_info, $order_id, $giftcard_code.

woo_ugc_check_giftcard_column_value

This filter can be used to change any column value in all the information tables on check gift card code page. The filter includes five parameters $column_value, $col_key, $ugccodeid, $item_id, $order_id.

woo_ugc_purchased_add_column

This filter can be used to add column in purchased gift card codes list table. The filter includes one parameter $columns which is an array of all columns.

woo_ugc_purchased_column_value

This filter can be used to display values of custom columns, added in purchased gift card codes list table. The filter includes three parameters $column_value, $column_name, $item.

woo_ugc_used_add_column

This filter can be used to add column in used gift card codes list table. The filter includes one parameter $columns which is an array of all columns.

woo_ugc_used_column_value

This filter can be used to display values of custom added columns in used gift card codes list table. The filter includes three parameters $column_value, $column_name, $item.

woo_ugc_unused_add_column

This filter can be used to add column in unused gift card codes list table. The filter includes one parameter $columns which is an array of all columns.

woo_ugc_unused_column_value

This filter can be used to display values of custom added columns in unused gift card codes list table. The filter includes three parameters $column_value, $column_name, $item.

woo_ugc_product_purchasedcodes_columns

This filter can be used to add/modify columns in purchased gift card codes popup in product meta settings. The filter includes one parameter $product_id.

woo_ugc_product_purchasedcodes_column_value

This filter can be used to add/modify columns values in purchased gift card codes popup in product meta settings. The filter includes three parameters $column_value, $ugccodes_data, $product_id.

woo_ugc_product_usedcodes_columns

This filter can be used to add/modify columns in used gift card codes popup in product meta settings. The filter includes one parameter $product_id.

woo_ugc_product_usedcodes_column_value

This filter can be used to add/modify columns values in used gift card codes popup in product meta settings. The filter includes three parameters $column_value, $ugccodes_data, $product_id.

woo_ugc_giftcard_code_valid_message

This filter can be used to modify valid gift card code message on check gift card code page. The filter include three parameters i.e. $message, $product_name and $ugccodeid.

woo_ugc_giftcard_code_expired_message

This filter can be used to modify expired gift card code message on check gift card code page. The filter include four parameters i.e. $message, $product_name, $expire_date and $ugccodeid.

woo_ugc_giftcard_code_used_message

This filter can be used to modify used gift card code message on check gift card code page. The filter includes four parameters i.e. $message, $product_name, $used_code_date and $ugccodeid.

woo_ugc_giftcard_code_invalid_message

This filter can be used to modify invalid gift card code message on check gift card code page. The filter includes one parameter i.e. $message.

woo_ugc_admin_giftcard_code_tabs

This filter can be used to add/edit/remove any tab on gift card codes page. The filter includes one parameter i.e. $giftcard_code_tabs.