WC_Customer::get_address_prop( string $prop, string $address = 'billing', string $context = 'view' )
Gets a prop for a getter method.
Description Description
Parameters Parameters
- $prop
-
(Required) Name of prop to get.
- $address
-
(Optional) billing or shipping.
Default value: 'billing'
- $context
-
(Optional) What the value is for. Valid values are 'view' and 'edit'. What the value is for. Valid values are view and edit.
Default value: 'view'
Return Return
(mixed)
Source Source
File: includes/class-wc-customer.php
protected function get_address_prop( $prop, $address = 'billing', $context = 'view' ) { $value = null; if ( array_key_exists( $prop, $this->data[ $address ] ) ) { $value = isset( $this->changes[ $address ][ $prop ] ) ? $this->changes[ $address ][ $prop ] : $this->data[ $address ][ $prop ]; if ( 'view' === $context ) { $value = apply_filters( $this->get_hook_prefix() . $address . '_' . $prop, $value, $this ); } } return $value; }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |