Plugin Directory

Changeset 3255043


Ignore:
Timestamp:
03/12/2025 10:06:46 PM (13 months ago)
Author:
cod24
Message:
  • bug fixed in the checkout page for old structure orders
Location:
cod24-shipping
Files:
26 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • cod24-shipping/tags/4.0/inc/class-cod24-woo.php

    r3254068 r3255043  
    415415                $shipping_method_id = $shipping_item->get_method_id();
    416416               
    417                 if ($shipping_method_id === 'cod24_tipax') {
     417                if ($shipping_method_id === 'cod24_tipax')
     418                {
    418419                    $shipping_cost = $shipping_item->get_total();
    419420                    $shipping_type = 'tipax' ;
    420                 } elseif ($shipping_method_id === 'cod24_special' || $shipping_method_id === 'cod24_pishtaz') {
     421                }
     422                else
     423                {
    421424                    $shipping_type = 'post';
    422425                }
    423             }
     426            }
    424427           
    425428            $cod24_info = array(
  • cod24-shipping/trunk/cod24-shipping.php

    r3254068 r3255043  
    33Plugin Name: COD24 Shipping For Woocommerce
    44Description: This plugin is adding COD24 shipping methods to woocommerce.
    5 Version: 4.0
     5Version: 4.0.1
    66Author: COD24
    77Author URI: https://cod24.ir
     
    2727        public function __construct()
    2828        {
    29             define('COD24_PLUGIN_VERSION', '4.0');
     29            define('COD24_PLUGIN_VERSION', '4.0.1');
    3030            define('COD24_PLUGIN_DIR', plugin_dir_path(__FILE__));
    3131            define('COD24_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cod24-shipping/trunk/inc/class-cod24-woo.php

    r3254068 r3255043  
    66 * Package: COD24 Shipping
    77 * Author: COD24
    8  * Last Modified Time: 2025/03/11 13:32:06
     8 * Last Modified Time: 2025/03/13 01:11:50
    99 * License: GPL-2.0+
    1010 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    469469            <form id="order_barcode_form" method="post" action="">
    470470                <div class="cod24-shipping-type" style="margin-bottom:10px">
    471                     <div class="label" style="margin-bottom:10px"><label for="shipping_type"><?php esc_attr_e('Shipping Type', 'cod24-shipping'); ?></label></div>
     471                    <div class="label" style="margin-bottom:10px"><label for="shipping_type"><?php echo esc_attr__('Shipping Type', 'cod24-shipping'); ?></label></div>
    472472                    <select name="shipping_type" id="shipping_type" class="postbox shipping_type" style="margin-bottom:10px" disabled>
    473                         <option value="none"><?php esc_attr_e('Select the shipping type...','cod24-shipping'); ?></option>
    474                         <option value="post" <?php if( !empty( $order_cod24_info ) ) selected( 'post', $order_cod24_info['shipping_type'] ); ?>><?php esc_attr_e('Post', 'cod24-shipping'); ?></option>
    475                         <option value="tipax" <?php if( !empty( $order_cod24_info ) ) selected( 'tipax', $order_cod24_info['shipping_type'] ); ?>><?php esc_attr_e('Tipax', 'cod24-shipping'); ?></option>
     473                        <option value="none"><?php echo esc_attr__('Select the shipping type...','cod24-shipping'); ?></option>
     474                        <option value="post" <?php if( !empty( $order_cod24_info ) ) selected( 'post', $order_cod24_info['shipping_type'] ); ?>><?php echo esc_attr__('Post', 'cod24-shipping'); ?></option>
     475                        <option value="tipax" <?php if( !empty( $order_cod24_info ) ) selected( 'tipax', $order_cod24_info['shipping_type'] ); ?>><?php echo esc_attr__('Tipax', 'cod24-shipping'); ?></option>
    476476                    </select>
    477477                </div>
     
    479479                <div class="cod24-post-section <?php if( !empty( $order_cod24_info ) && isset( $order_cod24_info['shipping_type'] ) && $order_cod24_info['shipping_type'] == 'post' ) echo 'active'; ?>">
    480480                    <div class="cod24-meta-fields" style="margin-bottom:10px">
    481                         <div class="label" style="margin-bottom:10px"><label for="post_custom_total_weight"><?php esc_attr_e('Total weight of order', 'cod24-shipping'); ?> (<?php echo esc_attr( $weight_unit ); ?>)</label></div>
     481                        <div class="label" style="margin-bottom:10px"><label for="post_custom_total_weight"><?php echo esc_attr__('Total weight of order', 'cod24-shipping'); ?> (<?php echo esc_attr( $weight_unit ); ?>)</label></div>
    482482                        <input type="text" class="postbox post_custom_total_weight" id="post_custom_total_weight" style="margin-bottom:0px" name="post_custom_total_weight" value="<?php if( !empty( $order_cod24_info ) && isset( $order_cod24_info['total_weight'] ) && !empty( $order_cod24_info['total_weight'] ) ) echo esc_attr( $order_cod24_info['total_weight'] ); ?>" />
    483483                    </div>
     
    541541                    </div>
    542542                    <div class="cod24-meta-fields" style="margin-bottom:10px">
    543                         <div class="label" style="margin-bottom:10px"><label for="custom_total_dimension"><?php esc_attr_e('Total dimension of order', 'cod24-shipping'); ?> (<?php echo esc_attr( $dimension_unit ); ?>)</label></div>
     543                        <div class="label" style="margin-bottom:10px"><label for="custom_total_dimension"><?php echo esc_attr__('Total dimension of order', 'cod24-shipping'); ?> (<?php echo esc_attr( $dimension_unit ); ?>)</label></div>
    544544                        <div class="cod24-dimension-fields">
    545545                            <input type="text" class="dimension-length" id="custom_total_dimension" style="margin-bottom:0px" name="custom_total_dimension[length]" placeholder="<?php echo esc_attr__('Length','cod24-shipping'); ?>" value="<?php if( !empty( $order_cod24_info ) && isset( $order_cod24_info['total_dimension'] ) && !empty( $order_cod24_info['total_dimension'] ) ) echo esc_attr( $order_cod24_info['total_dimension']['length'] ); ?>" />
     
    554554                    </div>
    555555                    <div class="cod24-meta-fields" style="margin-bottom:10px">
    556                         <div class="label" style="margin-bottom:10px"><label for="pack_type"><?php esc_attr_e('Pack Type', 'cod24-shipping'); ?></label></div>
     556                        <div class="label" style="margin-bottom:10px"><label for="pack_type"><?php echo esc_attr__('Pack Type', 'cod24-shipping'); ?></label></div>
    557557                        <select name="pack_type" id="pack_type" class="postbox pack_type" style="margin-bottom:10px">
    558                             <option value="none"><?php esc_attr_e('Select the pack type...','cod24-shipping'); ?></option>
     558                            <option value="none"><?php echo esc_attr__('Select the pack type...','cod24-shipping'); ?></option>
    559559                            <?php foreach(COD24_Tipax_API::get_pack_type_list() as $key => $pack_type_item) : ?>
    560560                            <option value="<?php echo esc_attr( $key ); ?>" <?php if( !empty( $order_cod24_info ) && isset( $order_cod24_info['pack_type'] ) && !empty( $order_cod24_info['pack_type'] ) ) selected( $key, $order_cod24_info['pack_type'] ); ?>><?php echo esc_attr( $pack_type_item ); ?></option>
     
    617617        public function save_order_cod24_fields( $order_id )
    618618        {
     619            // Check if we are in the admin area
     620            if ( ! is_admin() ) {
     621                return;
     622            }
     623
    619624            $order = wc_get_order( $order_id );
    620625            $old_cod24_info = $order->get_meta('_cod24_info', true);
  • cod24-shipping/trunk/readme.txt

    r3254068 r3255043  
    44Requires at least: 5.0
    55Tested up to: 6.7
    6 Stable tag: 4.0
     6Stable tag: 4.0.1
    77License: GPL-2.0+
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4444== Changelog ==
    4545
     46= 4.0.1 =
     47* bug fixed in the checkout page for old structure orders
     48
    4649= 4.0 =
    4750* Added Tipax Shipping
Note: See TracChangeset for help on using the changeset viewer.