• Resolved paputin

    (@paputin)


    Hello, thank you for this great plugin!

    My shipping carrier requires the “company” field to be always filled in.
    Is there a way to use the “Full Name (Shipping)” if the field “Company (Shipping)” is empty?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    please, open section “Misc Settings” and add following PHP code.
    thanks, Alex

    add_filter('woe_get_order_value_shipping_company', function ($value, $order, $fieldname) {
     if( empty($value) )
       $value = $order->get_shipping_first_name(). " ".$order->get_shipping_last_name();
     return $value;
    }, 10, 3);
    Thread Starter paputin

    (@paputin)

    This works great.
    Thank you very much Alex!

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘if “field” empty, then…’ is closed to new replies.