Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
test
/
test
/
test
/
wp-content
/
plugins
/
flexible-shipping
/
src
/
WPDesk
/
FS
/
TableRate
:
DefaultRulesSettings.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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, ], ]; } }