Woocommerce PDF Vouchers Developer Docs

“Woocommerce PDF Vouchers” Documentation by “WPWeb”

Action Reference

woo_vou_after_productinfo

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

woo_vou_after_voucherinfo

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

woo_vou_after_buyerinfo

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

woo_vou_after_orderinfo

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

woo_vou_redeemed_voucher_code

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


Filter Reference

woo_vou_edit_vendor_role

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

woo_vou_get_pdf_sizes

This filter can be used to add custom pdf size instead of predefined sizes. The filter includes one parameter, $pdf_szes which is an array containing PDF sizes with width, height and fontsize parameter.

woo_vou_voucher_download_text

This filter can be used to change "Voucher Download" text. The filter includes two parameter, $download_text and $product_id.

woo_vou_unlimited_code_pattern

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

woo_vou_assigned_admin_roles

This filter can be used to add any user roles like Shop manager, Editor etc to allow check voucher code page and other voucher report pages. The filter includes one parameter, $roles, which is an array containing admin roles.

Note : It is different then "woo_vou_edit_vendor_role" filter, as from vendor role you can only redeem those vouchers which are assigned to him. But this filter allows users to redeem all voucher codes, as admin have access to all the voucher codes in the system.

woo_vou_check_vou_productinfo_fields

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

woo_vou_check_vou_voucherinfo_fields

This filter can be used to remove voucher info section or add/delete any column in vouher info section on check voucher code page. The filter includes three parameters i.e. $voucher_info, $order_id, $voucher_code.

woo_vou_check_vou_buyerinfo_fields

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

woo_vou_check_vou_orderinfo_fields

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

woo_vou_check_voucher_column_value

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

woo_vou_qrcode_dimention

This filter can be used to change dimension of QRCode. The filter includes three parameters $dimension, $font_size, $pdf_size. $dimension contains an array in which you can modify height and width option.

woo_vou_barcode_dimention

This filter can be used to change dimension of BarCode. The filter includes three parameters $dimension, $font_size, $pdf_size. $dimension contains an array in which you can modify height and width option.

woo_vou_purchased_add_column

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

woo_vou_purchased_column_value

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

woo_vou_used_add_column

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

woo_vou_used_column_value

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

woo_vou_unused_add_column

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

woo_vou_unused_column_value

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

woo_vou_product_purchasedcodes_columns

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

woo_vou_product_purchasedcodes_column_value

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

woo_vou_product_usedcodes_columns

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

woo_vou_product_usedcodes_column_value

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

woo_vou_voucher_code_valid_message

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

woo_vou_voucher_code_expired_message

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

woo_vou_voucher_code_used_message

This filter can be used to modify used voucher code message on check voucher code page. The filter include four parameters i.e. $message, $product_name, $used_code_date and $voucodeid

woo_vou_voucher_code_invalid_message

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

woo_vou_admin_voucher_code_tabs

This filter can be used to add/edit/remove any tab on voucher codes page. The filter include one parameter i.e. $voucher_code_tabs