Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_available_bank_names() {
- return array (
- '' => 'Choose your bank',
- 'Absa-Group-Limited' => 'Absa Group Limited',
- 'African-Bank-Limited' => 'African Bank Limited',
- 'Bidvest-Bank-Limited' => 'Bidvest Bank Limited',
- 'Capitec-Bank-Limited' => 'Capitec Bank Limited',
- 'Discovery-Limited' => 'Discovery Limited',
- 'First-National-Bank' => 'First National Bank',
- 'FirstRand-Bank' => 'FirstRand Bank – A subsidiary of First Rand Limited',
- 'Grindrod-Bank-Limited' => 'Grindrod Bank Limited',
- 'Imperial-Bank-South-Africa' => 'Imperial Bank South Africa',
- 'Investec-Bank-Limited' => 'Investec Bank Limited',
- 'Nedbank-Limited' => 'Nedbank Limited',
- 'Sasfin-Bank-Limited' => 'Sasfin Bank Limited',
- 'Standard-Bank-of-South-Africa' => 'Standard Bank of South Africa',
- 'Ubank-Limited' => 'Ubank Limited',
- 'TymeBank' => 'TymeBank',
- );
- }
- add_filter('wcfm_marketplace_settings_fields_billing_bank', function($fields) {
- if(isset($fields['bank_name'])) {
- $bank_list = get_available_bank_names();
- $fields['bank_name'] = array(
- 'label' => __('Bank Name', 'wc-frontend-manager'),
- 'placeholder' => __('Name of bank', 'wc-frontend-manager'),
- 'name' => 'payment[bank][bank_name]',
- 'type' => 'select',
- 'in_table' => 'yes',
- 'wrapper_class' => 'paymode_field paymode_bank_transfer',
- 'class' => 'wcfm-select wcfm_ele paymode_field paymode_bank_transfer',
- 'label_class' => 'wcfm_title wcfm_ele paymode_field paymode_bank_transfer',
- 'options' => $bank_list,
- 'value' => $fields['bank_name']['value'],
- );
- }
- if( isset( $fields['ifsc'] ) ) {
- $fields['ifsc'] = array(
- 'label' => __('Branch Code', 'wc-frontend-manager'),
- 'placeholder' => __('Branch code', 'wc-frontend-manager'),
- 'name' => 'vendor_data[payment][bank][ifsc]',
- 'type' => 'text',
- 'in_table' => 'yes',
- 'wrapper_class' => 'paymode_field paymode_bank_transfer',
- 'class' => 'wcfm-text wcfm_ele paymode_field paymode_bank_transfer',
- 'label_class' => 'wcfm_title wcfm_ele paymode_field paymode_bank_transfer',
- 'value' => $fields['ifsc']['value'],
- );
- }
- return $fields;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement