Troubles with woocommerce_ajax_get_customer_details filter

Hi, is there anybody good at woocommerce in administration? Could somebody help me out with the "woocommerce_ajax_get_customer_details" filter? I have asked a week ago but I've got no answer. I'm trying to make my plugins custom fields editable in admin, but I'm just not able to pass values, even if set. If you want to try the plugin, the dev version is here: https://github.com/vyskoczilova/kybernaut-ic-dic. The fields are "billing_ic" and "billing_dic". And even if I try something like this, the value is not passed into the field. What did I miss?

add_filter( 'woocommerce_ajax_get_customer_details', 'woolab_icdic_ajax_get_customer_details', 10, 3 );
function woolab_icdic_ajax_get_customer_details($data, $customer, $user_id ){

   $data['billing']['_billing_ic'] = '1';
    $data['billing']['_billing_dic'] = '2';
    $data['billing']['billing_ic'] = '10';
    $data['billing']['billing_dic'] = '20';
    $data['billing_ic'] = '3';
    $data['billing_dic'] = '4';
    $data['billing']['ic'] = '5';
    $data['billing']['dic'] = '6';
    $data['billing']['_ic'] = '7';
    $data['billing']['_dic'] = '8';
    return $data;
}
  • Ivan
    • Developer

    Hi Karolina !

    I tested this plugin and the following lines are correct

    $data['billing']['billing_ic'] = '10';
        $data['billing']['billing_dic'] = '20';

    And you can check it if you open some order via Admin area then hit Edit Billing Details then hit Load billing Address. It works fine.

    Anyway, it seems it doesn't relate to our plugins and themes.

    Best regards,
    Ivan.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.