Plugin Directory

Changeset 3493773


Ignore:
Timestamp:
03/29/2026 10:44:30 AM (8 days ago)
Author:
passatgt
Message:

v4.1.2

Location:
hungarian-pickup-points-for-woocommerce/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • hungarian-pickup-points-for-woocommerce/trunk/includes/class-cod.php

    r3418917 r3493773  
    138138
    139139                //Set tax class
     140                $standard_tax_class = '';
    140141                $shipping_tax_rate = WC()->cart->get_cart_item_tax_classes_for_shipping();
    141142                $cod_tax_rate = VP_Woo_Pont_Helpers::get_option('cod_tax_class', '');
    142143                if($cod_tax_rate == 'inherit' && $shipping_tax_rate && is_array($shipping_tax_rate) && count($shipping_tax_rate) > 0) {
    143144                    $cod_tax_rate = $shipping_tax_rate[0];
     145
     146                    //Standard class takes priority over any other tax class.
     147                    if ( in_array( $standard_tax_class, $shipping_tax_rate, true ) ) {
     148                        $cod_tax_rate = $standard_tax_class;
     149                    }
    144150                }
    145151               
  • hungarian-pickup-points-for-woocommerce/trunk/includes/class-settings.php

    r3405941 r3493773  
    361361                    }
    362362                }
     363               
    363364                update_option('vp_woo_pont_home_delivery', $home_delivery);
    364365           
  • hungarian-pickup-points-for-woocommerce/trunk/includes/providers/class-csomagpiac.php

    r3470331 r3493773  
    291291            }
    292292
    293             if($data['provider'] == 'csomagpiac_sameday') {
     293            if($data['provider'] == 'csomagpiac_foxpost') {
    294294                $services[] = array(
    295                     'name' => 'sameday_easybox',
     295                    'name' => 'foxpost_csomagpont',
    296296                    'value' => $data['point_id']
    297297                );
     
    323323
    324324        //Extra services
    325         if($extra_services = VP_Woo_Pont_Helpers::get_option('csomagpiac_extra_services')) {
     325        if($extra_services = VP_Woo_Pont_Helpers::get_option('csomagpiac_extra_services') && $data['provider'] != 'csomagpiac_foxpost') {
    326326            foreach($extra_services as $extra_service) {
    327327                $item['services'][] = array(
  • hungarian-pickup-points-for-woocommerce/trunk/includes/providers/class-expressone.php

    r3177392 r3493773  
    8686            ),
    8787            array(
     88                'type' => 'text',
     89                'title' => __('Value insurance limit', 'vp-woo-pont'),
     90                'default' => 50000,
     91                'desc_tip' => __('If empty, it will be the order total up to 50.000 HUF. If you need a higher maximum limit, enter that here.', 'vp-woo-pont'),
     92                'id' => 'expressone_insurance_limit'
     93            ),
     94            array(
    8895                'type' => 'sectionend',
    8996            ),
     
    97104        //Get order details
    98105        $order = wc_get_order($data['order_id']);
     106        $comment = VP_Woo_Pont()->labels->get_package_contents_label($data, 'expressone');
    99107
    100108        //Set package weight
     
    125133                        'delivery_type' => ($data['point_id']) ? 'D2S' : '24H',
    126134                        'insurance' => array(
    127                             'enable' => true,
     135                            'enable' => false,
    128136                            'parcel_price' => (double) $order->get_total() //Net order total
    129137                        ),
     
    134142                    ),
    135143                    'ref_number' => $data['reference_number'],
    136                     'note' => '',
     144                    'note' => $comment,
    137145                    'invoice_number' => $data['invoice_number'],
    138146                )
     
    144152            )
    145153        );
     154
     155        //Set maximum insurance value
     156        if($insurance_limit = VP_Woo_Pont_Helpers::get_option('expressone_insurance_limit', 50000)) {
     157            if($data['package']['total'] > $insurance_limit) {
     158                $item['deliveries'][0]['services']['insurance']['enabled'] = true;
     159                $item['deliveries'][0]['services']['insurance']['parcel_price'] = $insurance_limit;
     160            }
     161        }
    146162
    147163        //If package count set
  • hungarian-pickup-points-for-woocommerce/trunk/includes/providers/class-gls.php

    r3435268 r3493773  
    410410        if($data['point_id'] && $order->get_shipping_country() != 'HU') {
    411411            $provider_id = $data['order']->get_meta('_vp_woo_pont_provider');
    412             $point = VP_Woo_Pont()->find_point_info($provider_id, $data['point_id']);
     412            $point = VP_Woo_Pont()->find_point_info($provider_id, $data['point_id'], $order->get_shipping_country());
    413413            if($point) {
    414414                $parcel['DeliveryAddress']['Street'] = $point['addr'];
  • hungarian-pickup-points-for-woocommerce/trunk/includes/providers/class-kvikk.php

    r3466977 r3493773  
    19171917
    19181918    public function get_enabled_countries() {
    1919         $countries = array_keys(get_option('vp_woo_pont_kvikk_countries', array('HU' => 'Hungary')));
     1919        $saved_countries = get_option('vp_woo_pont_kvikk_countries', array('HU' => 'Hungary'));
     1920        if(!is_array($saved_countries)) {
     1921            $saved_countries = array('HU' => 'Hungary');
     1922        }
     1923        $countries = array_keys($saved_countries);
    19201924        return $countries;
    19211925    }
  • hungarian-pickup-points-for-woocommerce/trunk/includes/providers/class-sameday.php

    r3435268 r3493773  
    289289            //Set a different service code for international home delivery shipments
    290290            if($order->get_shipping_country() != 'HU') {
    291                 $item['service'] = 28;
     291                $item['service'] = 28; //Crossborder HD 24H
    292292            }
    293293
  • hungarian-pickup-points-for-woocommerce/trunk/index.php

    r3470354 r3493773  
    88Text Domain: vp-woo-pont
    99Domain Path: /languages/
    10 Version: 4.1.1
     10Version: 4.1.2
    1111WC requires at least: 7.0
    12 WC tested up to: 10.4.3
     12WC tested up to: 10.6.1
    1313Requires Plugins: woocommerce
    1414*/
     
    6969        self::$plugin_basename = plugin_basename(__FILE__);
    7070        self::$plugin_path = trailingslashit(dirname(__FILE__));
    71         self::$version = '4.1.1';
     71        self::$version = '4.1.2';
    7272        self::$plugin_url = plugin_dir_url(self::$plugin_basename);
    7373
  • hungarian-pickup-points-for-woocommerce/trunk/readme.txt

    r3470331 r3493773  
    44Requires at least: 6.0
    55Tested up to: 6.9
    6 Stable tag: 4.1.1
     6Stable tag: 4.1.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5656
    5757== Changelog ==
     58
     594.1.2
     60* Csomagpiac Foxpost javítás
     61* Utánvét díj áfakulcs javítás
     62* ExpressOne címke megjegyzés mező
     63* GLS külföldi címkegenerálás javítás
     64* Express One maximum biztosítás összeg beállítás
     65* Sameday csomagpont lista import javítás
    5866
    59674.1.1
Note: See TracChangeset for help on using the changeset viewer.