habibjutt
1/8/2016 - 10:46 AM

wp inserting data to post meta database table.php

        if (!empty($_POST['admin-email-switched'])) {

            update_post_meta($order_id, 'admin_email_switched', sanitize_text_field($_POST['admin-email-switched']));
        }

        if (!empty($_POST['admin-user-name-switched'])) {

            update_post_meta($order_id, 'admin_user_name_switched', sanitize_text_field($_POST['admin-user-name-switched']));
        }

        if (!empty($_POST['admin-switched-id'])) {

            update_post_meta($order_id, 'admin_switched_id', sanitize_text_field($_POST['admin-switched-id']));
        }

        if (!empty($_POST['admin-role-switched'])) {

            update_post_meta($order_id, 'admin_role_switched', sanitize_text_field($_POST['admin-role-switched']));
        }