Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFields::__construct()
Sets up core fields.
Method of the class: CheckoutFields{}
No Hooks.
Return
null
. Nothing (null).
Usage
$CheckoutFields = new CheckoutFields(); $CheckoutFields->__construct( $asset_data_registry );
- $asset_data_registry(AssetDataRegistry) (required)
- Instance of the asset data registry.
CheckoutFields::__construct() CheckoutFields:: construct code WC 9.7.1
public function __construct( AssetDataRegistry $asset_data_registry ) { $this->asset_data_registry = $asset_data_registry; $this->fields_locations = [ // omit email from shipping and billing fields. 'address' => array_merge( \array_diff_key( $this->get_core_fields_keys(), array( 'email' ) ) ), 'contact' => array( 'email' ), 'order' => [], ]; add_filter( 'woocommerce_get_country_locale_default', array( $this, 'update_default_locale_with_fields' ) ); }