allowed_tags = wp_kses_allowed_html('post');
$this->allowed_tags['input'] = array(
'type' => true,
'name' => true,
'value' => true,
'class' => true,
'id' => true,
'placeholder' => true,
'checked' => true,
'readonly' => true,
'disabled' => true,
'size' => true,
'maxlength' => true,
'min' => true,
'max' => true,
'step' => true,
'pattern' => true,
'required' => true,
'autocomplete'=> true,
'autofocus' => true,
);
add_action('pisol_custom_field_aww_gateway_fees', array($this,'gateways'), 10, 2);
}
function gateways($setting, $saved_value){
$gateways = $this->gateways_options();
foreach($gateways as $gateway => $gateway_title){
$this->gateway_fee($setting, $saved_value, $gateway, $gateway_title);
}
}
function gateway_fee($setting, $saved_value, $gateway, $gateway_title){
$value = isset($saved_value[$gateway]) ? $saved_value[$gateway] : '';
$label = '';
$desc = (isset($setting['desc'])) ? '
Enter gateway charge amount for '.wp_kses_post($gateway_title).'' : "";
$field = '';
$shortcode_html = '';
$this->bootstrap($setting, $label, $field, $desc, $shortcode_html, 6);
}
function gateways_options(){
$payment_gateways = WC()->payment_gateways->payment_gateways();
$skip_gateways = array('pisol_wallet');
$gateways = array();
foreach($payment_gateways as $gateway){
if(!in_array($gateway->id, $skip_gateways)){
$gateways[$gateway->id] = $gateway->get_title();
}
}
return $gateways;
}
function bootstrap($setting, $label, $field, $desc = "",$shortcode_html = '', $title_col = 5){
$setting_col = 12 - $title_col;
?>