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
/
plugins
/
flexible-shipping
/
src
/
WPDesk
/
FS
/
AdvertMetabox
:
ProPluginAdvertMetabox.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace WPDesk\FS\AdvertMetabox; use FSVendor\Octolize\Brand\Assets\AdminAssets; use FSVendor\Octolize\Brand\UpsellingBox\SettingsSidebar; use FSVendor\Octolize\Brand\UpsellingBox\ShippingMethodInstanceShouldShowStrategy; use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable; use FSVendor\WPDesk\PluginBuilder\Plugin\HookableCollection; use FSVendor\WPDesk\PluginBuilder\Plugin\HookableParent; use WPDesk\FS\TableRate\ShippingMethodSingle; class ProPluginAdvertMetabox implements Hookable, HookableCollection { use HookableParent; private string $assets_url; public function __construct( string $assets_url ) { $this->assets_url = $assets_url; } public function hooks() { if ( defined( 'FLEXIBLE_SHIPPING_PRO_VERSION' ) ) { return; } $should_show_strategy = new ShippingMethodInstanceShouldShowStrategy( new \WC_Shipping_Zones(), ShippingMethodSingle::SHIPPING_METHOD_ID ); $this->add_hookable( new AdminAssets( $this->assets_url, 'fs', $should_show_strategy ) ); $this->add_hookable( new SettingsSidebar( 'woocommerce_settings_tabs_shipping', $should_show_strategy, __( 'Get Flexible Shipping PRO!', 'flexible-shipping' ), [ __( 'Shipping Classes support', 'flexible-shipping' ), __( 'Products-based shipping', 'flexible-shipping' ), __( 'Quantity-based shipping', 'flexible-shipping' ), __( 'Additional Cost', 'flexible-shipping' ), __( 'Conditional Logic', 'flexible-shipping' ), __( 'Hide the shipping methods', 'flexible-shipping' ), __( 'Premium 1-on-1 Support', 'flexible-shipping' ), ], get_locale() === 'pl_PL' ? 'https://octol.io/fs-box-upgrade-pl' : 'https://octol.io/fs-box-upgrade', __( 'Upgrade Now', 'flexible-shipping' ), 1200 ) ); $this->hooks_on_hookable_objects(); } }