first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
/**
* @package Flexible Shipping
*
* @var string $shipping_method_id .
*/
?>
<div class="fs-flexible-shipping-sidebar fs-flexible-shipping-sidebar-pro <?php echo esc_attr( isset( $shipping_method_id ) ? $shipping_method_id : '' ); ?>" style="height: auto;">
<div class="wpdesk-metabox">
<div class="wpdesk-stuffbox">
<h3 class="title"><?php esc_html_e( 'Get Flexible Shipping PRO!', 'flexible-shipping' ); ?></h3>
<?php
$fs_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-box-upgrade-pl' : 'https://octol.io/fs-box-upgrade';
?>
<div class="inside">
<div class="main">
<ul>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Shipping Classes support', 'flexible-shipping' ); ?>
</li>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Product count based costs', 'flexible-shipping' ); ?>
</li>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Stopping, Cancelling a rule', 'flexible-shipping' ); ?>
</li>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Additional calculation methods', 'flexible-shipping' ); ?>
</li>
</ul>
<a class="button button-primary" href="<?php echo esc_url( $fs_link ); ?>"
target="_blank"><?php esc_html_e( 'Upgrade now to PRO version &rarr;', 'flexible-shipping' ); ?></a>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,37 @@
<?php
/**
* @package Flexible Shipping
*
* @var string $shipping_method_id .
*/
$fsie_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-info-addons-pl' : 'https://octol.io/addons-box-fs';
?>
<div class="fs-flexible-shipping-sidebar fs-flexible-shipping-sidebar-fsie <?php echo esc_attr( isset( $shipping_method_id ) ? $shipping_method_id : '' ); ?>"
style="height: auto;">
<div class="wpdesk-metabox">
<div class="wpdesk-stuffbox">
<h3 class="title"><?php esc_html_e( 'Extend the Flexible Shipping capabilities with functional add-ons', 'flexible-shipping' ); ?></h3>
<div class="inside">
<div class="main">
<ul>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Calculate the shipping cost based on your custom locations or the WooCommerce defaults', 'flexible-shipping' ); ?>
</li>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Define shipping cost for each Vendor / Product Author in your marketplace', 'flexible-shipping' ); ?>
</li>
<li>
<span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Move, replace, update or backup multiple shipping methods with Import / Export feature', 'flexible-shipping' ); ?>
</li>
</ul>
<a class="button button-primary" href="<?php echo esc_url( $fsie_link ); ?>"
target="_blank"><?php esc_html_e( 'Buy Flexible Shipping Add-ons &rarr;', 'flexible-shipping' ); ?></a>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,21 @@
<?php
/**
* @package Flexible Shipping
*
* @var string $shipping_method_id .
*/
$show_fs_pro_ads = ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' );
if ( $show_fs_pro_ads ) {
include 'ads/html-ads-fs-pro.php';
}
$show_fs_ie_ads = wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) && ! wpdesk_is_plugin_active( 'flexible-shipping-import-export/flexible-shipping-import-export.php' );
if ( $show_fs_ie_ads ) {
include 'ads/html-ads-fsie.php';
}
?>
<div class="clear"></div>

View File

@@ -0,0 +1,6 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<div class="flexible_shipping_message">
<span class="<?php echo $messages[$post->ID]['status']; ?>">
<?php echo $messages[$post->ID]['message']; ?>
</span>
</div>

View File

@@ -0,0 +1,45 @@
<tr valign="top">
<th scope="row" class="titledesc">
<label for="<?php echo esc_attr( $field_key ); ?>"><?php echo wp_kses_post( $data['title'] ); ?></label>
<?php echo $this->get_tooltip_html( $data ); ?>
</th>
<td class="forminp">
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
<span class="<?php echo esc_attr( $data['class'] ); ?>" id="<?php echo esc_attr( $field_key ); ?>" style="<?php echo esc_attr( $data['css'] ); ?>">
<table class="flexible_shipping_services wc_shipping widefat wp-list-table" cellspacing="0">
<thead>
<tr>
<th class="sort">&nbsp;</th>
<th class="service_code"><?php _e( 'Code', 'flexible-shipping' ); ?></th>
<th class="service_name"><?php _e( 'Name', 'flexible-shipping' ); ?></th>
<th class="select">
<?php _e( 'Enabled', 'flexible-shipping' ); ?><?php /* <input type="checkbox" class="tips checkbox-select-all-services" value="1" data-tip="<?php _e( 'Enable all', 'flexible-shipping' ); ?>" /> */ ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ( $services as $service_code => $service ) : ?>
<tr>
<td class="sort"></td>
<td class="service_code"><?php echo $service_code; ?></td>
<td class="service_name">
<input name="<?php echo esc_attr( $field_key ); ?>[<?php echo $service_code ?>][name]" type="text" value="<?php echo esc_attr( $service['name'] ); ?>" class="woocommerce_flexible_shipping_service_name"/>
</td>
<td width="1%" class="select" nowrap>
<input name="<?php echo esc_attr( $field_key ); ?>[<?php echo $service_code ?>][enabled]" type="checkbox" class="checkbox-select-service" value="<?php echo esc_attr( $service_code ); ?>" <?php echo $service['enabled'] ? 'checked' : ''; ;?> />
</td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot>
<tr>
<th colspan="4"><span class="description"><?php _e( 'Drag and drop the services to control their display order. Confirm by clicking Save changes button below.', 'flexible-shipping' ); ?></span></th>
</tr>
</tfoot>
</table>
</span>
<?php echo $this->get_description_html( $data ); ?>
</fieldset>
</td>
</tr>

View File

@@ -0,0 +1,15 @@
<style type="text/css" media="screen">
#adminmenu #toplevel_page_flexible-shipping-menu a div.wp-menu-image::before {
font-family: WooCommerce !important;
content: '\e019';
}
.toplevel_page_flexible-shipping-menu #wpdesk_tracker_notice {
margin: 10px 20px 0 2px;
}
.fs-connect__inner-container {
background-color: #FFF;
margin-bottom: 20px;
}
</style>

View File

@@ -0,0 +1,36 @@
<?php
/**
* @package Flexible Shipping
*
* Shipping method scripts.
*/
?>
<script type="text/javascript">
var url = document.location.href;
url = fs_removeParam( 'action', url );
url = fs_removeParam( 'methods_id', url );
url = fs_removeParam( 'added', url );
url = fs_trimChar( url, '?' );
if ( url.includes( 'method_id=' ) ) {
url = url + "&action=edit";
}
jQuery( '#mainform' ).attr( 'action', url );
</script>
<?php if ( isset( $_GET['action'] ) && isset( $_GET['instance_id'] ) ) : ?>
<script type="text/javascript">
<?php
$zone = WC_Shipping_Zones::get_zone_by( 'instance_id', sanitize_key( $_GET['instance_id'] ) );
$shipping_method_woo = WC_Shipping_Zones::get_shipping_method( sanitize_key( $_GET['instance_id'] ) );
$content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'flexible-shipping' ) . '</a> &gt ';
$content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> &gt ';
$content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] ) ) . '">' . esc_html( $shipping_method_woo->get_title() ) . '</a>';
$content .= ' &gt <span class="flexible-shipping-method-title"></span>';
?>
jQuery('#mainform h2').first().replaceWith( '<h2>' + '<?php echo $content; // phpcs:ignore ?>' + '</h2>' );
jQuery('.flexible-shipping-method-title').text(jQuery('#woocommerce_flexible_shipping_method_title').val());
jQuery('#woocommerce_flexible_shipping_method_title').on('keyup',function(){
jQuery('.flexible-shipping-method-title').text(jQuery('#woocommerce_flexible_shipping_method_title').val());
});
</script>
<?php endif; ?>

View File

@@ -0,0 +1,230 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<tr valign="top">
<td class="forminp" style="padding-left:0;padding-right:0;">
<fieldset>
<legend class="screen-reader-text"><span><?php echo wp_kses_post( $data['title'] ); ?></span></legend>
<table class="flexible_shipping_methods wc_shipping widefat wp-list-table" cellspacing="0">
<thead>
<tr>
<th class="sort">&nbsp;</th>
<th class="title"><?php esc_html_e( 'Title', 'flexible-shipping' ); ?></th>
<th class="status"><?php esc_html_e( 'Enabled', 'flexible-shipping' ); ?></th>
<th class="visibility"><?php esc_html_e( 'Visibility', 'flexible-shipping' ); ?></th>
<th class="default"><?php esc_html_e( 'Default', 'flexible-shipping' ); ?></th>
<th class="integration"><?php esc_html_e( 'Integration', 'flexible-shipping' ); ?></th>
<th class="select check-column"><input type="checkbox" class="tips checkbox-select-all"
value="1"
data-tip="<?php esc_attr_e( 'Select all', 'flexible-shipping' ); ?>"/>
</th>
</tr>
</thead>
<tbody>
<?php if ( isset( $shipping_method_order ) && is_array( $shipping_method_order ) ) : ?>
<?php foreach ( $shipping_method_order as $shipping_method_id ) : ?>
<?php $shipping_method = $shipping_methods[ $shipping_method_id ]; ?>
<?php $tr_class = ''; ?>
<?php
if ( isset( $_GET['added'] ) && sanitize_key( $_GET['added'] ) == $shipping_method_id ) {
$tr_class = 'highlight';
}
if ( isset( $_GET['updated'] ) && sanitize_key( $_GET['updated'] ) == $shipping_method_id ) {
$tr_class = 'highlight';
}
?>
<tr id="method_<?php echo esc_attr( $shipping_method_id ); ?>" class="<?php echo esc_attr( $tr_class ); ?>">
<td width="1%" class="sort">
<input type="hidden"
name="method_order[<?php echo esc_attr( $shipping_method['id'] ); ?>]"
value="<?php echo esc_attr( $shipping_method['id'] ); ?>"/>
</td>
<td class="title">
<a data-qa-id="shipping-method-<?php echo esc_attr( $shipping_method['method_title'] ); ?>"
href="<?php echo esc_url( add_query_arg( 'method_id', $shipping_method_id, add_query_arg( 'action', 'edit' ) ) ); ?>">
<strong><?php echo esc_html( $shipping_method['method_title'] ); ?></strong>
</a>
<?php if ( isset( $shipping_method['method_description'] ) && $shipping_method['method_description'] != '' ) : ?>
(<?php echo esc_html( $shipping_method['method_description'] ); ?>)
<?php endif; ?>
</td>
<td width="1%" class="status">
<?php if ( isset( $shipping_method['method_enabled'] ) && 'yes' === $shipping_method['method_enabled'] ) : ?>
<span class="status-enabled tips"
data-tip="<?php esc_attr_e( 'yes', 'flexible-shipping' ); ?>"><?php esc_html_e( 'yes', 'flexible-shipping' ); ?></span>
<?php else : ?>
<span class="na">-</span>
<?php endif; ?>
</td>
<td width="1%" class="default visibility">
<?php if ( isset( $shipping_method['method_visibility'] ) && 'yes' === $shipping_method['method_visibility'] ) : ?>
<span class="status-enabled tips"
data-tip="<?php esc_attr_e( 'Show only for logged in users', 'flexible-shipping' ); ?>"><?php esc_html_e( 'yes', 'flexible-shipping' ); ?></span>
<?php else : ?>
<span class="na tips"
data-tip="<?php esc_attr_e( 'Show for all users', 'flexible-shipping' ); ?>">-</span>
<?php endif; ?>
</td>
<td width="1%" class="default">
<?php if ( 'yes' === $shipping_method['method_default'] ) : ?>
<span class="status-enabled tips"
data-tip="<?php esc_attr_e( 'yes', 'flexible-shipping' ); ?>"><?php esc_html_e( 'yes', 'flexible-shipping' ); ?></span>
<?php else : ?>
<span class="na">-</span>
<?php endif; ?>
</td>
<?php echo wp_kses_post( apply_filters( 'flexible_shipping_method_integration_col', '<td width="1%" class="integration default">-</td>', $shipping_method ) ); ?>
<td width="1%" class="select check-column" nowrap>
<input type="checkbox" class="tips checkbox-select"
value="<?php echo esc_attr( $shipping_method['id'] ); ?>"
data-tip="<?php echo esc_html( $shipping_method['method_title'] ); ?>"/>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
<tfoot>
<tr>
<th>&nbsp;</th>
<th colspan="8"><span
class="description"><?php esc_html_e( 'Drag and drop the above shipment methods to control their display order. Confirm by clicking Save changes button below.', 'flexible-shipping' ); ?></span>
</th>
</tr>
<tr>
<th>&nbsp;</th>
<th colspan="8">
<button id="flexible_shipping_remove_selected" class="button"
disabled><?php esc_html_e( 'Remove selected', 'flexible-shipping' ); ?></button>
<div class="flexilble_shipping_export_import">
<input id="flexible_shipping_import_file" type="file" name="import_file"
style="display:none;" accept=".csv,.json"/>
<input id="flexible_shipping_import_action" type="hidden" name="import_action"
value="0"/>
<button id="flexible_shipping_import_cancel" class="button"
style="display:none;"><?php esc_html_e( 'Cancel import', 'flexible-shipping' ); ?></button>
<input id="flexible_shipping_do_import" style="display:none;"
class="button button-primary"
data-instance-id="<?php echo esc_attr( isset( $_GET['instance_id'] ) ? sanitize_key( $_GET['instance_id'] ) : '1' ); ?>"
data-nonce="<?php echo esc_attr( wp_create_nonce( 'flexible_shipping' ) ); ?>" type="submit"
value="<?php esc_attr_e( 'Import', 'flexible-shipping' ); ?>"/>
<button id="flexible_shipping_import" class="button"
data-instance-id="<?php isset( $_GET['instance_id'] ) ? sanitize_key( $_GET['instance_id'] ) : '1'; ?>"
data-nonce="<?php echo esc_attr( wp_create_nonce( 'flexible_shipping' ) ); ?>"><?php esc_html_e( 'Import', 'flexible-shipping' ); ?></button>
<?php do_action( 'flexible_shipping_actions_row' ); ?>
</div>
<div style="clear:both;"></div>
</th>
</tr>
</tfoot>
</table>
<?php echo wp_kses_post( $this->get_description_html( $data ) ); ?>
</fieldset>
</td>
</tr>
<script type="text/javascript">
<?php
if ( version_compare( WC()->version, '2.6.0', '>=' ) ) :
$zone = WC_Shipping_Zones::get_zone_by( 'instance_id', sanitize_key( $_GET['instance_id'] ) );
$shipping_method_woo = WC_Shipping_Zones::get_shipping_method( sanitize_key( $_GET['instance_id'] ) );
$content = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping' ) . '">' . __( 'Shipping Zones', 'flexible-shipping' ) . '</a> > ';
$content .= '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_id() ) ) . '">' . esc_html( $zone->get_zone_name() ) . '</a> >';
$content .= esc_html( $shipping_method_woo->get_title() );
?>
jQuery('#mainform h2').first().replaceWith('<h2>' + '<?php echo wp_kses_post( $content ); ?>' + '</h2>');
<?php
global $wp;
$current_url = 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] );
?>
jQuery('#mainform').attr('action', '<?php echo esc_url( $current_url ); ?>');
<?php
endif;
?>
jQuery("input.checkbox-select-all").click(function () {
if (jQuery(this).is(':checked')) {
jQuery('input.checkbox-select').prop('checked', true);
} else {
jQuery('input.checkbox-select').prop('checked', false);
}
})
/**
* Enable Bulk Action Buttons when at least one Shipping Method is selected
*
*/
jQuery('.flexible_shipping_methods input[type="checkbox"]').click(function () {
jQuery('#flexible_shipping_export_selected, #flexible_shipping_remove_selected').attr('disabled', !jQuery('.flexible_shipping_methods td input[type="checkbox"]').is(':checked'));
});
jQuery('#flexible_shipping_remove_selected').click(function () {
var empty_url = '<?php echo add_query_arg( 'methods_id', '', add_query_arg( 'action', 'delete', admin_url( 'admin.php?page=wc-settings&tab=shipping&instance_id=' . sanitize_key( $_GET['instance_id'] ) ) ) ); // phpcs:ignore ?>';
var url = empty_url;
var first = true;
jQuery('input.checkbox-select').each(function () {
if (jQuery(this).is(':checked')) {
if (!first) {
url = url + ',';
} else {
url = url + '=';
}
url = url + jQuery(this).val();
first = false;
}
})
if (first) {
alert('<?php esc_attr_e( 'Please select shipment methods to remove', 'flexible-shipping' ); ?>');
return false;
}
if (url !== empty_url) {
jQuery('#flexible_shipping_remove_selected').prop('disabled', true);
jQuery('.woocommerce-save-button').prop('disabled', true);
window.location.href = url;
}
return false;
})
jQuery('#flexible_shipping_import').click(function () {
jQuery(this).hide();
jQuery('#flexible_shipping_do_import').show();
jQuery('#flexible_shipping_import_file').show();
jQuery('#flexible_shipping_import_cancel').show();
jQuery('input[name=save]').prop('disabled', true);
return false;
})
jQuery('#flexible_shipping_import_cancel').click(function () {
jQuery(this).hide();
jQuery('#flexible_shipping_do_import').hide();
jQuery('#flexible_shipping_import_file').hide();
jQuery('#flexible_shipping_import_cancel').hide();
jQuery('#flexible_shipping_import').show();
jQuery('input[name=save]').prop('disabled', false);
return false;
})
jQuery('#flexible_shipping_do_import').click(function () {
if (jQuery('#flexible_shipping_import_file').val() == '') {
alert('<?php esc_attr_e( 'Select file to import', 'flexible-shipping' ); ?>');
return false;
}
jQuery('#flexible_shipping_import_action').val('1');
jQuery('input[name=save]').prop('disabled', false);
jQuery('.woocommerce-save-button').click();
return false;
})
<?php
if ( isset( $_POST['import_action'] ) && sanitize_key( $_POST['import_action'] ) == '1' ) { // phpcs:ignore
?>
jQuery('.updated.inline:lt(1)').hide();
jQuery('.updated.inline:lt(2)').hide();
<?php
}
?>
</script>
<?php

View File

@@ -0,0 +1,76 @@
<?php
/**
* @var $integration_checkbox bool
* @var $show_fs_connect bool
*/
$pl = get_locale() === 'pl_PL';
$youtube_url = 'https://www.youtube.com/embed/qsFvYoiNDgU';
$general_settings_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=general-settings#Ustawienia_glowne' : 'https://docs.flexibleshipping.com/article/25-general-settings/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=general-settings&utm_content=fs-configuration-flexibleshippingtablerate';
$adding_a_shipping_method_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=adding-a-shipping-method#Metody_wysylki' : 'https://docs.flexibleshipping.com/article/29-shipping-methods/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=adding-a-shipping-method&utm_content=fs-configuration-flexibleshippingtablerate';
$currency_support_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=currency-support#Waluty' : 'https://docs.flexibleshipping.com/article/30-currency-support/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=currency-support&utm_content=fs-configuration-flexibleshippingtablerate';
$weight_based_shipping_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=weight-based-shipping#Koszt_na_wage' : 'https://docs.flexibleshipping.com/article/32-weight-based-shipping-woocommerce/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=weight-based-shipping&utm_content=fs-configuration-flexibleshippingtablerate';
$shipping_insurance_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=shipping-insurance#Ubezpieczenie_przesylki' : 'https://docs.flexibleshipping.com/article/34-shipping-insurance/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=shipping-insurance&utm_content=fs-configuration-flexibleshippingtablerate';
$conditional_cash_on_delivery_url = $pl ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/?utm_source=flexible-shipping-info&utm_medium=link&utm_campaign=flexible-shipping-resources-box&utm_content=conditional-cash-on-delivery#Przesylka_za_pobraniem' : 'https://docs.flexibleshipping.com/article/35-conditional-cash-on-delivery/?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=contitional-cash-on-delivery&utm_content=fs-configuration-flexibleshippingtablerate';
?>
</table>
<div class="fs-page-wrap">
<div class="fs-box">
<h3 class="wc-settings-sub-title"><?php _e( 'How to use Flexible Shipping?', 'flexible-shipping' ); ?></h3>
<ol>
<li>
<?php
echo sprintf(
__( 'To add first Flexible Shipping method go to %sShipping zones%s and add Flexible Shipping to a shipping zone.', 'flexible-shipping' ),
'<a href="' . admin_url( 'admin.php?page=wc-settings&tab=shipping&section' ) . '">',
'</a>'
);
?>
</li>
<li><?php _e( 'You can start the configuration by clicking the Flexible Shipping link in the Shipping methods table.', 'flexible-shipping' ); ?></li>
</ol>
<h4><?php _e( 'Quick Video Overview', 'flexible-shipping' ); ?></h4>
<div class="flexible-shipping-video">
<iframe width="688" height="387" src="<?php echo $youtube_url?>?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<h4><?php _e( 'More resources', 'flexible-shipping' ); ?></h4>
<ul>
<li><a href="<?php echo $general_settings_url; ?>"><?php _e( 'General Settings', 'flexible-shipping' ); ?></a></li>
<li><a href="<?php echo $adding_a_shipping_method_url; ?>"><?php _e( 'Adding a shipping method', 'flexible-shipping' ); ?></a></li>
<li><a href="<?php echo $currency_support_url; ?>"><?php _e( 'Currency Support', 'flexible-shipping' ); ?></a></li>
<li><a href="<?php echo $weight_based_shipping_url; ?>"><?php _e( 'Weight Based Shipping', 'flexible-shipping' ); ?></a></li>
<li><a href="<?php echo $shipping_insurance_url; ?>"><?php _e( 'Shipping Insurance', 'flexible-shipping' ); ?></a></li>
<li><a href="<?php echo $conditional_cash_on_delivery_url; ?>"><?php _e( 'Conditional Cash on Delivery', 'flexible-shipping' ); ?></a></li>
</ul>
<?php if ( $show_fs_connect ) : ?>
<h3 class="wc-settings-sub-title fs-connect-box-header"><?php _e( 'Integrations', 'flexible-shipping' ); ?></h3>
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row" class="titledesc">
<label for="enable-fs-connect-box"><?php _e( 'FS Connect', 'flexible-shipping' ); ?></label>
</th>
<td class="forminp">
<fieldset>
<legend class="screen-reader-text"><span><?php _e( 'FS Connect', 'flexible-shipping' ); ?></span></legend>
<label for="enable-fs-connect-box">
<input class="enable-fs-connect-box" <?php checked( $integration_checkbox, 1 ); ?> type="checkbox" name="fsconnect_box" id="enable-fs-connect-box" style="" value="1"> <?php _e( 'Enable integration with Flexible Shipping Connect', 'flexible-shipping' ); ?>
</label>
</fieldset>
</td>
</tr>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
<table>

View File

@@ -0,0 +1,32 @@
<?php
/**
* @var Metabox[] $metaboxes .
*
* @package Flexible Shipping
*/
use WPDesk\FS\Info\Metabox;
?>
</table>
<div class="fs-info-wrapper">
<?php foreach ( $metaboxes as $metabox ) : ?>
<div id="<?php echo esc_attr( $metabox->get_id() ); ?>"
class="<?php echo esc_attr( $metabox->get_classes() ); ?>">
<?php if ( $metabox->has_title() ) : ?>
<h3><?php echo esc_html( $metabox->get_title() ); ?></h3>
<?php endif; ?>
<?php if ( $metabox->has_body() ) : ?>
<div class="content"><?php echo $metabox->get_body(); // phpcs:ignore ?></div>
<?php endif; ?>
<?php if ( $metabox->has_footer() ) : ?>
<div class="footer"><?php echo wp_kses_post( $metabox->get_footer() ); ?></div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<table>