Need Shipping Address Field From WooCommerce To Test Against

I need the field name for the ship to address 1 and 2 field.  I am not sure of the class name in woocommerce that would contain those attributes.  I have the conditional logic in my child theme but I am not sure how to get the field names to test against.
sharingsunshineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sharingsunshineAuthor Commented:
this is my code and it isn't displaying the shipping address anywhere in the checkout fields.  I just need to be able to retrieve the shipping addresses and then I can plug them into an existing set of codes that will do what else is needed.

class POBox_Shipping extends WC_Customer {

function get_shipping_address_1() {

if (!empty($shipping_address_1)){
return $this->shipping_address_1;
}
else {
echo 'this is goofy';
}

add_filter( 'woocommerce_checkout_fields', 'get_shipping_address_1' );
}
}

Open in new window

0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Let me know if you still need help and I will try and spin up a WP/Woo site to test
0
sharingsunshineAuthor Commented:
Yes, I still need help.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you don't get a reply back from me after 6 hours, just ping back here to send me a reminder.
0
sharingsunshineAuthor Commented:
I still need help.  My computer has been working itermittently for 2 weeks and I am waiting for a replacement.  So, that's why I haven't responded sooner.
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Do you see separate areas for billing and shipping on the checkout page?  If not, go to settings -> shipping tab -> Shipping options and make sure that the radio option for, " Force shipping to the customer billing address" is not selected.  That will give you the option to see both.

Did you want the shipping to show up somewhere else?
0
sharingsunshineAuthor Commented:
I now have the shipping address showing.  No, I don't need to move shipping.  I just need to be able to test the shipping address against a regex.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.