| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/blueversion/wp-content/plugins/give/src/Framework/FieldsAPI/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Give\Framework\FieldsAPI;
/**
* @since 3.0.0
*/
class BillingAddress extends Group
{
const TYPE = 'billingAddress';
/**
* @since 3.0.0
*/
public $apiUrl;
/**
* @since 3.0.0
*/
public $groupLabel;
/**
* @since 3.0.0
*/
public function setApiUrl(string $url): BillingAddress
{
$this->apiUrl = $url;
return $this;
}
/**
* @since 3.0.0
*/
public function setGroupLabel(string $groupLabel): BillingAddress
{
$this->groupLabel = $groupLabel;
return $this;
}
/**
* @since 3.0.0
*
* @throws Exceptions\EmptyNameException|Exceptions\NameCollisionException
*/
public static function make($name): BillingAddress
{
return parent::make($name)
->append(
Select::make('country')
->label(__('Country', 'give'))
->options([
['value', 'label'],
]),
Text::make('address1')
->label(__('Address Line 1', 'give')),
Text::make('address2')
->label(__('Address Line 2', 'give')),
Text::make('city')
->label(__('City', 'give')),
Hidden::make('state')
->label(__('State/Province/Country', 'give')),
Text::make('zip')
->label(__('Zip/Postal Code', 'give'))
);
}
}