-
-
Save anonymous/0d3a59a594b74087ae9098485037f73b to your computer and use it in GitHub Desktop.
WC Vendors Pro 3 Custom Fields
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
/* WC Vendors Pro - My Custom Bank Fields */ | |
function store_bank_details( ){ | |
if ( class_exists( 'WCVendors_Pro' ) ){ | |
$key = '_wcv_custom_settings_bankname'; | |
$value = get_user_meta( get_current_user_id(), $key, true ); | |
// Bank Name | |
WCVendors_Pro_Form_Helper::input( array( | |
'id' => $key, | |
'label' => __( 'Banküberweisung als Auszahlungs Methode Ihres Provision verwenden', 'wcvendors-pro' ), | |
'placeholder' => __( 'Bank Name', 'wcvendors-pro' ), | |
'desc_tip' => 'true', | |
'description' => __( 'Bankinstitut', 'wcvendors-pro' ), | |
'type' => 'text', | |
'value' => $value, | |
) | |
); | |
} | |
} | |
function store_iban_details( ){ | |
if ( class_exists( 'WCVendors_Pro' ) ){ | |
$key = '_wcv_custom_settings_ibanname'; | |
$value = get_user_meta( get_current_user_id(), $key, true ); | |
// iban Name | |
WCVendors_Pro_Form_Helper::input( array( | |
'id' => $key, | |
'label' => __( 'IBAN Nummer bitte nicht vergessen', 'wcvendors-pro' ), | |
'placeholder' => __( 'IBAN NUMMER', 'wcvendors-pro' ), | |
'desc_tip' => 'true', | |
'description' => __( 'IBAN Nummer', 'wcvendors-pro' ), | |
'type' => 'text', | |
'value' => $value, | |
) | |
); | |
} | |
} | |
add_action( 'wcvendors_admin_after_commission_due', 'wcv_store_bank_details_admin' ); | |
function wcv_store_bank_details_admin( $user ) { | |
?> | |
<tr> | |
<th><label for="_wcv_custom_settings_bankname"><?php _e( 'Bank Name', 'wcvendors-pro' ); ?></label></th> | |
<td><input type="text" name="_wcv_custom_settings_bankname" id="_wcv_custom_settings_bankname" value="<?php echo get_user_meta( $user->ID, '_wcv_custom_settings_bankname', true ); ?>" class="regular-text"></td> | |
</tr> | |
add_action( 'wcvendors_admin_after_commission_due', 'wcv_store_iban_details_admin' ); | |
function wcv_store_iban_details_admin( $user ) { | |
?> | |
<tr> | |
<th><label for="_wcv_custom_settings_iban"><?php _e( 'IBAN NUMMER', 'wcvendors-pro' ); ?></label></th> | |
<td><input type="text" name="_wcv_custom_settings_iban" id="_wcv_custom_settings_iban" value="<?php echo get_user_meta( $user->ID, '_wcv_custom_settings_iban', true ); ?>" class="regular-text"></td> | |
</tr> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment