Current Path : /storage/v11800/newruvamithai/public_html/wp-content/plugins/google-listings-and-ads/src/Value/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/newruvamithai/public_html/wp-content/plugins/google-listings-and-ads/src/Value/MerchantCenterSettings.php |
<?php
declare( strict_types=1 );
namespace Automattic\WooCommerce\GoogleListingsAndAds\Value;
defined( 'ABSPATH' ) || exit;
/**
* Class MerchantCenterSettings
*
* @package Automattic\WooCommerce\GoogleListingsAndAds\Value
*/
class MerchantCenterSettings extends ArrayWithRequiredKeys implements ValueInterface {
/**
* Array of required keys. Should be in key => value format.
*
* @var array
*/
protected $required_keys = [
'shipping_rate' => true,
'shipping_time' => true,
];
/**
* ArrayWithRequiredKeys constructor.
*
* @param array $data
*/
public function __construct( array $data ) {
parent::__construct( $data );
$this->data = array_merge(
[
'shipping_rate' => 'automatic',
'shipping_time' => 'flat',
'tax_rate' => 'destination',
'website_live' => false,
'checkout_process_secure' => false,
'payment_methods_visible' => false,
'refund_tos_visible' => false,
'contact_info_visible' => false,
],
$this->data
);
}
/**
* Get the value of the object.
*
* @return array
*/
public function get(): array {
return $this->data;
}
}