Shipping improvement
This commit is contained in:
parent
603fe20eaf
commit
3ab6de6a51
|
@ -859,7 +859,7 @@ function woocommerce_admin_fields($options) {
|
|||
|
||||
foreach (woocommerce_shipping::$shipping_methods as $method) :
|
||||
|
||||
$title = ($method->title) ? ucwords($method->title) : ucwords($method->id);
|
||||
$title = ($method->method_title) ? ucwords($method->method_title) : ucwords($method->id);
|
||||
|
||||
$links[] = '<a href="#shipping-'.$method->id.'">'.$title.'</a>';
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ function woocommerce_product_data_box() {
|
|||
|
||||
// Ordering
|
||||
woocommerce_wp_text_input( array( 'id' => 'menu_order', 'label' => _x('Sort Order', 'ordering', 'woothemes'), 'value' => $post->menu_order ) );
|
||||
|
||||
do_action('woocommerce_product_options_grouping');
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
@ -80,6 +82,8 @@ function woocommerce_product_data_box() {
|
|||
else:
|
||||
echo '<input type="hidden" name="sku" value="'.get_post_meta($thepostid, 'sku', true).'" />';
|
||||
endif;
|
||||
|
||||
do_action('woocommerce_product_options_sku');
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
@ -107,6 +111,8 @@ function woocommerce_product_data_box() {
|
|||
echo '" placeholder="' . __('To…', 'woothemes') . '" maxlength="10" />
|
||||
<span class="description">' . __('Date format', 'woothemes') . ': <code>YYYY-MM-DD</code></span>
|
||||
</p>';
|
||||
|
||||
do_action('woocommerce_product_options_pricing');
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
@ -118,8 +124,12 @@ function woocommerce_product_data_box() {
|
|||
else:
|
||||
echo '<input type="hidden" name="weight" value="'.get_post_meta($thepostid, 'weight', true).'" />';
|
||||
endif;
|
||||
|
||||
do_action('woocommerce_product_options_weight');
|
||||
|
||||
echo '</div>';
|
||||
|
||||
do_action('woocommerce_product_options_general_product_data');
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
@ -143,7 +153,8 @@ function woocommerce_product_data_box() {
|
|||
endforeach;
|
||||
|
||||
woocommerce_wp_select( array( 'id' => 'tax_class', 'label' => __('Tax Class', 'woothemes'), 'options' => $classes_options ) );
|
||||
|
||||
|
||||
do_action('woocommerce_product_options_tax');
|
||||
?>
|
||||
</div>
|
||||
<?php if (get_option('woocommerce_manage_stock')=='yes') : ?>
|
||||
|
@ -159,6 +170,8 @@ function woocommerce_product_data_box() {
|
|||
'outofstock' => __('Out of stock', 'woothemes')
|
||||
) ) );
|
||||
|
||||
do_action('woocommerce_product_options_stock');
|
||||
|
||||
echo '<div class="stock_fields">';
|
||||
|
||||
// Stock
|
||||
|
@ -171,6 +184,8 @@ function woocommerce_product_data_box() {
|
|||
'yes' => __('Allow', 'woothemes')
|
||||
) ) );
|
||||
|
||||
do_action('woocommerce_product_options_stock_fields');
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ class flat_rate extends woocommerce_shipping_method {
|
|||
|
||||
public function __construct() {
|
||||
$this->id = 'flat_rate';
|
||||
$this->method_title = __('Flat rate', 'woothemes');
|
||||
$this->enabled = get_option('woocommerce_flat_rate_enabled');
|
||||
$this->title = get_option('woocommerce_flat_rate_title');
|
||||
$this->availability = get_option('woocommerce_flat_rate_availability');
|
||||
|
|
|
@ -13,6 +13,7 @@ class free_shipping extends woocommerce_shipping_method {
|
|||
|
||||
public function __construct() {
|
||||
$this->id = 'free_shipping';
|
||||
$this->method_title = __('Free shipping', 'woothemes');
|
||||
$this->enabled = get_option('woocommerce_free_shipping_enabled');
|
||||
$this->title = get_option('woocommerce_free_shipping_title');
|
||||
$this->min_amount = get_option('woocommerce_free_shipping_minimum_amount');
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
class woocommerce_shipping_method {
|
||||
|
||||
var $id;
|
||||
var $method_title;
|
||||
var $title;
|
||||
var $availability;
|
||||
var $countries;
|
||||
|
|
Loading…
Reference in New Issue