• Resolved hccadre

    (@hccadre)


    Hello

    I am using the plugin.

    I define two field

    billing section
    Label: Estado / Provincia
    Meta nema: _billing_state
    ccs class: form-row-wide address-field thwcfd-field-wrapper thwcfd-field-state

    shipping section
    Label: Provincia
    Meta nema: _shipping_state
    ccs class: form-row-wide address-field thwcfd-field-wrapper thwcfd-field-state

    In checkout when I call

    $shipping_state = WC()->customer->get_shipping_state();
    $shipping_state = WC()->customer->get_billing_state();

    The system is send me back the _billing_state value

    I wonder if this behavior has something to do with the plugin

    Thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @hccadre

    form-row-wide address-field thwcfd-field-wrapper thwcfd-field-state

    Please note that the thwcfd class is derived from the Checkout Field Editor plugin and is a different plugin than our Flexible Checkout Fields.

    Thread Starter hccadre

    (@hccadre)

    Hi

    I use this class because I need to reload the checkout payment summary when the customer selects an state in the shipping state combo.

    When the client selects the shipping state its loaded again the summary and I can work on the woocommerce_review_order_after_submit action according to the value selected.

    How can I do this with your pluggin?
    Is there a class that I can use with similar behavior?

    Thanks

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @hccadre

    The update_totals_on_change class recalculates the costs after changing the field in the form.

    Thread Starter hccadre

    (@hccadre)

    I put the update_totals_on_change and work well, but in checkout when I call

    $shipping_state = WC()->customer->get_shipping_state();
    $shipping_state = WC()->customer->get_billing_state();

    The system is send me back the _billing_state value in both case

    I don’t know what is wrong with the plugin

    This is the code

    add_action(‘woocommerce_review_order_after_submit’, ‘not_ticked_box11’);
    function not_ticked_box11() {

    $shipping_state = WC()->customer->get_shipping_state();

    }

    The system is send me back the _billing_state

    Any advice ?

    thanks

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @hccadre

    I am sorry but our support covers native plugin functions. I am not allowed to suggest solutions related to custom modifications on the website.

    In the documentation we have a basic guide on how to show the value entered in the field.

    If you would like to display a value of specific field entered by your customer in the checkout, use below PHP code:

    echo $order->get_meta( 'meta_name');

    To learn a meta name (the name that the field is written under in the database), check the field’s configuration.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with state field’ is closed to new replies.