Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/flexible-shipping-pro   php

Repository URL to install this package:

Version: 1.11.1 

/ views / html-shipping-method-rules-js.php

<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$key                  = 'method_rules[xxx][shipping_class][]';
$args                 = array(
	'type'              => 'select_multiple',
	'options'           => $shipping_classes,
	'input_class'       => array( 'fs-shipping-class', 'hs-beacon-search' ),
	'custom_attributes' => array(
		'data-beacon_search' => __( 'Shipping class', 'flexible-shipping-pro' ),
	),
	'return'            => true,
);
$value                = 'all';
$field_shipping_class = woocommerce_form_field( $key, $args, $value );

$key        = 'method_rules[xxx][stop]';
$args       = array(
	'type'              => 'checkbox',
	'input_class'       => array( 'hs-beacon-search' ),
	'custom_attributes' => array(
		'data-beacon_search' => __( 'Stop', 'flexible-shipping-pro' ),
	),
	'return'            => true,
);
$value      = 0;
$field_stop = woocommerce_form_field( $key, $args, $value );

$key          = 'method_rules[xxx][cancel]';
$args         = array(
	'type'              => 'checkbox',
	'input_class'       => array( 'hs-beacon-search' ),
	'custom_attributes' => array(
		'data-beacon_search' => __( 'Cancel', 'flexible-shipping-pro' ),
	),
	'return'            => true,
);
$value        = 0;
$field_cancel = woocommerce_form_field( $key, $args, $value );

$key                   = 'method_rules[xxx][cost_additional]';
$args                  = array(
	'type'              => 'text',
	'return'            => true,
	'custom_attributes' => array(
		'data-beacon_search' => __( 'Additional cost', 'flexible-shipping-pro' ),
	),
	'input_class'       => array( 'wc_input_price', 'hs-beacon-search' ),
);
$value                 = '';
$field_cost_additional = woocommerce_form_field( $key, $args, $value );

$key             = 'method_rules[xxx][per_value]';
$args            = array(
	'type'              => 'text',
	'input_class'       => array( 'wc_input_price', 'hs-beacon-search' ),
	'custom_attributes' => array(
		'data-beacon_search' => __( 'Value', 'flexible-shipping-pro' ),
	),
	'return'            => true,
);
$value           = '';
$field_per_value = woocommerce_form_field( $key, $args, $value );

?>
<td class="cost_additional">\
	<?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_cost_additional ) ) ); ?> \
</td>\
<td class="per_value">\
	<?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_per_value ) ) ); ?> \
</td>\
<td class="shipping_class hs-beacon-search" data-beacon_search="<?php echo esc_attr( __( 'Shipping class', 'flexible-shipping-pro' ) ); ?>">\
	<?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_shipping_class ) ) ); ?> \
</td>\
<td class="stop">\
	<?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_stop ) ) ); ?> \
</td>\
<td class="cancel">\
	<?php echo str_replace( "'", '"', str_replace( "\r", "", str_replace( "\n", "", $field_cancel ) ) ); ?> \
</td>\