BlockEditing
2 weeks ago
Convert
2 weeks ago
Duplicate
2 weeks ago
Management
2 weeks ago
Timestamps
2 weeks ago
Tracker
2 weeks ago
views
2 weeks ago
CommonMethodSettings.php
2 weeks ago
FreeShippingCalculator.php
2 weeks ago
FreeShippingThresholdRuleValidator.php
2 weeks ago
MethodDescription.php
2 weeks ago
MethodLogo.php
2 weeks ago
MethodLogoCheckoutBlocksAssets.php
2 weeks ago
MethodLogoSettingsField.php
2 weeks ago
MethodSettings.php
2 weeks ago
MethodTitle.php
2 weeks ago
RateCalculator.php
2 weeks ago
RateCalculatorFactory.php
2 weeks ago
SettingsDisplayPreparer.php
2 weeks ago
SettingsProcessor.php
2 weeks ago
SingleMethodSettings.php
2 weeks ago
SettingsDisplayPreparer.php
32 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Class SettingsDisplayPreparer |
| 4 | * |
| 5 | * @package WPDesk\FS\TableRate\ShippingMethod |
| 6 | */ |
| 7 | |
| 8 | namespace WPDesk\FS\TableRate\ShippingMethod; |
| 9 | |
| 10 | use FSVendor\WPDesk\Beacon\Beacon\WooCommerceSettingsFieldsModifier; |
| 11 | |
| 12 | /** |
| 13 | * Can prepare settings fields for display. |
| 14 | */ |
| 15 | class SettingsDisplayPreparer { |
| 16 | |
| 17 | /** |
| 18 | * Prepare settings for display. |
| 19 | * Ie. set select options when options are from API - prevents unwanted API calls on non settings requests. |
| 20 | * |
| 21 | * @param array $settings . |
| 22 | * |
| 23 | * @return array |
| 24 | */ |
| 25 | public function prepare_settings_for_display( array $settings ) { |
| 26 | $modifier = new WooCommerceSettingsFieldsModifier(); |
| 27 | $settings = $modifier->append_beacon_search_data_to_fields( $settings ); |
| 28 | |
| 29 | return apply_filters( 'flexible-shipping/settings/prepare-for-display', $settings ); |
| 30 | } |
| 31 | } |
| 32 |