• Resolved miwebdesigns

    (@miwebdesigns)


    Hi,

    This plugin works well, however, I need to access the fields via PHP.

    I have tried the following to access the phone and emails fields:
    $order->get_shipping_phone()
    $order->get_shipping_email()

    But it does not work. ??
    It does not return anything.

    How can I access your extra shipping fields via PHP?

    BTW, great plugin.

    Michael.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter miwebdesigns

    (@miwebdesigns)

    mmmmmm. I think this worked?

    get_post_meta($order->get_id(), ‘_shipping_email’, true);
    get_post_meta($order->get_id(), ‘_shipping_phone’, true);

    Plugin Author FAKTOR VIER

    (@faktorvier)

    Hi @miwebdesigns

    Like you already found out

    get_post_meta($order->get_id(), ‘_shipping_email’, true);
    get_post_meta($order->get_id(), ‘_shipping_phone’, true);

    is the correct way to access the fields.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Access Shipping Email & Phone via PHP’ is closed to new replies.