WC_Customer::get_billing
Get billing.
Method of the class: WC_Customer{}
Hooks from the method
Returns
Array.
Usage
$WC_Customer = new WC_Customer(); $WC_Customer->get_billing( $context );
- $context(string)
- What the value is for. Valid values are
'view'and'edit'.
Default:'view'
Changelog
| Since 3.2.0 | Introduced. |
WC_Customer::get_billing() WC Customer::get billing code WC 10.5.0
public function get_billing( $context = 'view' ) {
$value = null;
$prop = 'billing';
if ( array_key_exists( $prop, $this->data ) ) {
$changes = array_key_exists( $prop, $this->changes ) ? $this->changes[ $prop ] : array();
$value = array_merge( $this->data[ $prop ], $changes );
if ( 'view' === $context ) {
$value = apply_filters( $this->get_hook_prefix() . $prop, $value, $this );
}
}
return $value;
}