File "DefaultRulesSettings.php"
Full Path: /home/jlklyejr/public_html/wp-content/test/test/test/wp-content/plugins/flexible-shipping/src/WPDesk/FS/TableRate/DefaultRulesSettings.php
File size: 727 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
/**
* Class DefaultRulesSettings
*
* @package WPDesk\FS\TableRate
*/
namespace WPDesk\FS\TableRate;
use WPDesk\FS\TableRate\Rule\Condition\None;
/**
* Can provide default settings for rules.
*/
class DefaultRulesSettings {
const NEW_FIELD = 'new';
/**
* @return array
*/
public function get_normalized_settings(): array {
return apply_filters( 'flexible-shipping/shipping-method/default-rules-settings', $this->get_default_settings() );
}
/**
* @return array
*/
private function get_default_settings(): array {
return [
[
'conditions' => [
[
'condition_id' => None::CONDITION_ID,
],
],
'cost_per_order' => '0',
self::NEW_FIELD => true,
],
];
}
}