Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669024yfield: shipping_address_country
Method: getShippingAddressCountry()
But that's just me 🤷♂️ -
order.getShippingDestinationCountry();
Shipping usually has a source and destination addresses. And possibly some intermediate ones. Making a clear and verbose distinction there feels only natural (at least to me).
Or, you know..
order.getShippingDestinationAddress().getCountry() -
The fun part about adresses: They're different in every part of the world.
Having a general adress object is a good idea.
Country is very unspecific. Usually it's an ISO 3166 code - 2 or 3 digits, dependent on country / preference.
A general object makes sense.
getShippingInformation()->
getAddress()->
getCountry()->
getName()
Shipping Information can consist of many things.
Weight Information, Packaging Information , ... -
$o -> a();
And no, there's no comments explaining it either.
My email is included at the top on the Author line tho... :) -
fuckwit12164y@HiFiWiFiSciFi Paypal link/bitcoin address as well. Ain't giving away my secrets for free
Related Rants
-
Cas97Just finished writing a script with all the classes and variables named after the characters from Sherlock Hol...
-
Christine13OH MY GOD WHO NAMES A CONFERENCE ROOM AFTER AN -ADDRESS-?? At my new job, we had all day training on Friday....
-
dockerdan12Remember when folders/files were named like this when you were young (or was it just me 😅): - project.xyz -...
Do you prefer:
$order->getShippingAddressCountry();
or
$order->getShippingCountry();
Fuck me, being a perfectionist slows me down.
Beign stuck on: Save that shit as address_shipping_country or shipping_country is purely stupid, i know.
rant
naming conventions