Merged in release/release-1.09 (pull request #10)
Release/release 1.09 * Install missing plugins * rs set to 1 * rebase pantheon for aws * rebase pantheon for aws * prod config change * prod config change * fix campaing issue * revert Approved-by: Jay Sharma
This commit is contained in:
committed by
Jay Sharma
parent
779393381f
commit
22f10a9edd
@@ -8,15 +8,13 @@
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$cost_desc = __( 'Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>.', 'woocommerce' ) . '<br/><br/>' . __( 'Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for the total cost of items, and <code>[fee percent="10" min_fee="20" max_fee=""]</code> for percentage based fees.', 'woocommerce' );
|
||||
$cost_link = sprintf( '<span id="wc-shipping-advanced-costs-help-text">%s <a target="_blank" href="https://woo.com/document/flat-rate-shipping/#advanced-costs">%s</a>.</span>', __( 'Charge a flat rate per item, or enter a cost formula to charge a percentage based cost or a minimum fee. Learn more about', 'woocommerce' ), __( 'advanced costs', 'woocommerce' ) );
|
||||
|
||||
$settings = array(
|
||||
'title' => array(
|
||||
'title' => __( 'Name', 'woocommerce' ),
|
||||
'title' => __( 'Method title', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
'description' => __( 'Your customers will see the name of this shipping method during checkout.', 'woocommerce' ),
|
||||
'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
|
||||
'default' => __( 'Flat rate', 'woocommerce' ),
|
||||
'placeholder' => __( 'e.g. Standard national', 'woocommerce' ),
|
||||
'desc_tip' => true,
|
||||
),
|
||||
'tax_status' => array(
|
||||
@@ -32,7 +30,6 @@ $settings = array(
|
||||
'cost' => array(
|
||||
'title' => __( 'Cost', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
'class' => 'wc-shipping-modal-price',
|
||||
'placeholder' => '',
|
||||
'description' => $cost_desc,
|
||||
'default' => '0',
|
||||
@@ -48,8 +45,8 @@ if ( ! empty( $shipping_classes ) ) {
|
||||
'title' => __( 'Shipping class costs', 'woocommerce' ),
|
||||
'type' => 'title',
|
||||
'default' => '',
|
||||
/* translators: %s: URL for link */
|
||||
'description' => sprintf( __( 'These costs can optionally be added based on the <a target="_blank" href="%s">product shipping class</a>. Learn more about <a target="_blank" href="https://woo.com/document/flat-rate-shipping/#shipping-classes">setting shipping class costs</a>.', 'woocommerce' ), admin_url( 'admin.php?page=wc-settings&tab=shipping§ion=classes' ) ),
|
||||
/* translators: %s: URL for link. */
|
||||
'description' => sprintf( __( 'These costs can optionally be added based on the <a href="%s">product shipping class</a>.', 'woocommerce' ), admin_url( 'admin.php?page=wc-settings&tab=shipping§ion=classes' ) ),
|
||||
);
|
||||
foreach ( $shipping_classes as $shipping_class ) {
|
||||
if ( ! isset( $shipping_class->term_id ) ) {
|
||||
@@ -59,7 +56,6 @@ if ( ! empty( $shipping_classes ) ) {
|
||||
/* translators: %s: shipping class name */
|
||||
'title' => sprintf( __( '"%s" shipping class cost', 'woocommerce' ), esc_html( $shipping_class->name ) ),
|
||||
'type' => 'text',
|
||||
'class' => 'wc-shipping-modal-price',
|
||||
'placeholder' => __( 'N/A', 'woocommerce' ),
|
||||
'description' => $cost_desc,
|
||||
'default' => $this->get_option( 'class_cost_' . $shipping_class->slug ), // Before 2.5.0, we used slug here which caused issues with long setting names.
|
||||
@@ -71,7 +67,6 @@ if ( ! empty( $shipping_classes ) ) {
|
||||
$settings['no_class_cost'] = array(
|
||||
'title' => __( 'No shipping class cost', 'woocommerce' ),
|
||||
'type' => 'text',
|
||||
'class' => 'wc-shipping-modal-price',
|
||||
'placeholder' => __( 'N/A', 'woocommerce' ),
|
||||
'description' => $cost_desc,
|
||||
'default' => '',
|
||||
@@ -80,15 +75,14 @@ if ( ! empty( $shipping_classes ) ) {
|
||||
);
|
||||
|
||||
$settings['type'] = array(
|
||||
'title' => __( 'Calculation type', 'woocommerce' ),
|
||||
'type' => 'select',
|
||||
'class' => 'wc-enhanced-select',
|
||||
'default' => 'class',
|
||||
'options' => array(
|
||||
'title' => __( 'Calculation type', 'woocommerce' ),
|
||||
'type' => 'select',
|
||||
'class' => 'wc-enhanced-select',
|
||||
'default' => 'class',
|
||||
'options' => array(
|
||||
'class' => __( 'Per class: Charge shipping for each shipping class individually', 'woocommerce' ),
|
||||
'order' => __( 'Per order: Charge shipping for the most expensive shipping class', 'woocommerce' ),
|
||||
),
|
||||
'description' => $cost_link,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user