'ac-fields-config'); $action_url = add_query_arg($arg, admin_url( 'admin.php' ) ); return $action_url; } public static function display_page(){ // showing the field self::handle_config_post(); include(ADDITIONAL_CHARGE__PLUGIN_DIR.'/views/admin/ac-field-config.php'); } protected static function handle_config_post(){ $isUpdate = filter_input(INPUT_POST, 'ac-update'); if($isUpdate==='1'){ // here we need to handle the form submit config $rates = filter_input(INPUT_POST, AdditionalCharge::$rate_var); $message = filter_input(INPUT_POST, AdditionalCharge::$message_var); $btn = filter_input(INPUT_POST, AdditionalCharge::$btn_var); $heading = filter_input(INPUT_POST, AdditionalCharge::$heading_var); $fee_label = filter_input(INPUT_POST, AdditionalCharge::$fee_label_var); update_option(AdditionalCharge::$rate_var, $rates); update_option(AdditionalCharge::$heading_var, $heading); update_option(AdditionalCharge::$message_var, $message); update_option(AdditionalCharge::$btn_var, $btn); update_option(AdditionalCharge::$fee_label_var, $fee_label); } } }