• Resolved lodyato

    (@lodyato)


    i use select field in my checkout but it’s 200+ items and he is changed weekly

    i rewrite it in function php
    “add_filter(‘woocommerce_checkout_fields’, ‘custom_override_checkout_fields’);

    function custom_override_checkout_fields($fields) {
    $arr=[“
    many values”];

    $fields[‘billing’][‘billing_europost’] = array(
    ‘type’ => ‘select’,
    ‘required’ => true,
    ‘options’ => $arr,
    ‘class’ => array(‘form-row-wide’),
    ‘clear’ => true
    );

    in frontend its work, but if i check order details in wp-admin he dont load options and if i save order – metafields cleared, how i can load options from my function php and not from plugins field options

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support krzysztofskorupa

    (@krzysztofskorupa)

    Hi,

    Thank you very much for contacting us.

    The developer responsible for the Flexible Checkout Fields plugin is currently on vacation.

    I will get back to you after he returns to let you know if this scheme will be possible.

    Thank you for your understanding.

    Best regards,

    Plugin Support krzysztofskorupa

    (@krzysztofskorupa)

    Hi,

    thank you for your patience.

    Please try adding the field this way:

    add_filter('woocommerce_billing_fields', 'custom_override_checkout_billing_fields');
    function custom_override_checkout_billing_fields($fields) {

    $fields['billing_europost'] = []; //..adjust field definition array here

    return $fields;
    }

    Let me know if you achieved the desired effect.

    Best regards,

    Plugin Support krzysztofskorupa

    (@krzysztofskorupa)

    Hi,
    I haven’t received a response to my request for some time now.
    I will close it for now.

    If you have any questions in the future, please let me know.
    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Select field values from function.php’ is closed to new replies.