API: General Settings
$padloper->getShopGeneralSettings()
Get shop general settings. Includes information such as shop name, email, weights and measures, currency, etc.
// get shop general settings.
/** @var WireData $shopGeneralSettings */
$shopGeneralSettings = $padloper->getshopGeneralSettings();
$shopName = $shopGeneralSettings->shop_name;
echo $shopName;
1
2
3
4
5
2
3
4
5
output: My Awesome Shop
$padloper->getShopEmail()
Get the shop email.
// shop's email address
echo $padloper->getShopEmail();
1
2
2
output: shop@myshop.com
$padloper->getShopCurrencyData()
Get currency data for the shop's specified currency. Includes information such as alphabetic code, minor unit, country, currency name, etc.
// get shop currency data associated with the shop's currency
/** @var WireData $shopCurrencyData */
$shopCurrencyData = $padloper->getShopCurrencyData();
// currency data 'currency' value
echo $shopCurrencyData->currency;
1
2
3
4
5
2
3
4
5
output: Pound Sterling
$padloper->getShopCurrency()
Get the shop currency. This returns the currency's 3-character ISO-4217 code.
// get shop currency alphabetic code
/** @var string $getShopCurrency */
$getShopCurrency = $padloper->getShopCurrency();
echo $getShopCurrency;
1
2
3
4
2
3
4
output: GBP
$padloper->getShopDateFormat()
Get the date and time format (if set) for the shop as per its general settings.
// get shop currency alphabetic code
/** @var string $shopDateAndTimeFormat */
$shopDateAndTimeFormat = $padloper->getShopDateFormat();
echo $shopDateAndTimeFormat;
1
2
3
4
2
3
4
output: l, j F Y H:i:s
INFO
Defaults to $dateFormat = "Y-m-d";
if shop setting is empty.