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 accepts three parameters:
$buyer_info
– an array containing buyer info columns i.e. buyer_name, buyer_email, billing_address, shipping_address, buyer_phone$order_id
– the numerical ID of the order, to which voucher code belongs$voucher_code
– an HTML string containing the voucher code
An example of how you can remove buyer phone is as below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove buyer phone during check voucher code. | |
*/ | |
function wpv_beng_remove_buyer_phone ( $buyer_info, $order_id, $voucode ) { | |
unset( $buyer_info['buyer_phone'] ); | |
return $buyer_info; | |
} | |
add_filter ( 'woo_vou_check_vou_buyerinfo_fields', 'wpv_beng_remove_buyer_phone', 10, 3 ); |
An example of how you can completely remove buyer section is as below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove buyer information during check voucher code. | |
*/ | |
function wpv_beng_remove_buyer_info ( $buyer_info, $order_id, $voucode ) { | |
return; | |
} | |
add_filter ( 'woo_vou_check_vou_buyerinfo_fields', 'wpv_beng_remove_buyer_info', 10, 3 ); |