Plugin Directory

Changeset 3411122


Ignore:
Timestamp:
12/04/2025 03:23:11 PM (4 months ago)
Author:
clickshipfc
Message:

V1.0.5 - Include Price & description fields at checkout

Location:
clickship/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • clickship/trunk/admin/class-clickship-admin.php

    r2802338 r3411122  
    7777        add_filter( 'woocommerce_shipping_methods', array(&$this,'add_clickship_shipping_rates'));
    7878        add_action( 'woocommerce_shipping_init', array(&$this,'add_clickship_shipping_rates_init'));
    79            
     79        /**
     80        * To show DDP description.
     81        *
     82        * @since    1.0.5
     83        */
     84        add_action('woocommerce_after_shipping_rate', function($rate) {
     85            $meta = $rate->get_meta_data();
     86
     87            if ( isset($meta['description']) && !empty($meta['description']) ) {
     88                echo '<p>'
     89                    . esc_html($meta['description']) .
     90                    '</p>';
     91            }
     92        });
    8093    }
    8194    /**
  • clickship/trunk/clickship.php

    r3238166 r3411122  
    1616 * Plugin URI:        https://www.clickship.com/
    1717 * Description:       We provide shipping rates at checkout to your customers.
    18  * Version:           1.0.3
     18 * Version:           1.0.5
    1919 * Author:            ClickShip
    2020 * Author URI:        https://www.clickship.com/
     
    3434 * Rename this for your plugin and update it as you release new versions.
    3535 */
    36 define('CLICKSHIP_VERSION', '1.0.3');
     36define('CLICKSHIP_VERSION', '1.0.5');
    3737define('CLICKSHIP_MIN_PHP_VERSION', '7.2');
    3838define('CLICKSHIP_MIN_WP_VERSION', '5.8');
  • clickship/trunk/includes/class-clickship-shipping.php

    r3267922 r3411122  
    221221
    222222        foreach ( $package['contents'] as $key => $value ) {
     223            $product = $value['data'];  // WC_Product object
     224            $currency = get_woocommerce_currency(); // current currency shown to the buyer
    223225            $item = array(
     226                'currency' => $currency,
    224227                'quantity' => $value ['quantity'],
    225228                'product_id' => $value ['product_id'],
    226                 'variant_id' => $value ['variation_id']
     229                'variant_id' => $value ['variation_id'],
     230                'price' => wc_get_price_to_display($product) // multi-currency safe
    227231            );         
    228232            array_push($items, $item);
     
    265269                $input_data['items'] = $this->getItems($package);
    266270                $input_data['origin'] = $this->getOriginAddress();
     271                $input_data['currency'] = get_woocommerce_currency(); // current currency shown to the buyer
    267272                $input_data['destination'] = $this->getDestinationAddress($package);
    268273           
     
    290295                $metadata = array(
    291296                    'cs_service_code' => sanitize_text_field($value['service_code']),
    292                     'cs_service_name' => sanitize_text_field($value['service_name'])
     297                    'cs_service_name' => sanitize_text_field($value['service_name']),
     298                    'description' => sanitize_text_field($value['description'])
    293299                );
    294300               
     
    296302                               
    297303                if($value ['transitDays'] > 0) {
    298                     $this->transitDays  = sanitize_text_field($value['transitDays']) + 1;
     304                    $this->transitDays  = sanitize_text_field($value['transitDays']);
    299305                    $this->serviveName  = sprintf( __('%s (%s business days)','clickship'), sanitize_text_field($value['service_name']), sanitize_text_field($this->transitDays) );
    300306                }
  • clickship/trunk/languages/clickship.pot

    r2802338 r3411122  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: ClickShip 1.0.0\n"
     5"Project-Id-Version: ClickShip 1.0.5\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/clickship\n"
    77"POT-Creation-Date: 2022-09-19 07:24:05+00:00\n"
  • clickship/trunk/readme.txt

    r3267922 r3411122  
    33Tags: shipping, custom shipping, weight based shipping, shipping methods, shipping automation
    44Requires at least: 5.8
    5 Tested up to: 6.7.1
     5Tested up to: 6.7.4
    66Requires PHP: 7.2
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88License: GNU General Public License v3.0
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.