Plugin Directory

Changeset 2857320


Ignore:
Timestamp:
01/30/2023 08:27:06 PM (3 years ago)
Author:
bostateam
Message:

add allow to open package

Location:
bosta-woocommerce
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • bosta-woocommerce/trunk/bosta-woocommerce.php

    r2839756 r2857320  
    55 * Author: Bosta
    66 * Author URI: https://www.bosta.co/
    7  * Version: 2.9.4
     7 * Version: 2.9.5
    88 * Requires at least: 5.0
    99 * php version 7.0
     
    454454    $ProductDescription = get_option('woocommerce_bosta_settings')['ProductDescription'];
    455455    $OrderRef = get_option('woocommerce_bosta_settings')['OrderRef'];
     456    $AllowToOpenPackage = get_option('woocommerce_bosta_settings')['AllowToOpenPackage'];
    456457    if (empty($APIKey)) {
    457458        $redirect_url = admin_url('admin.php?') . 'page=wc-settings&tab=shipping&section=bosta';
     
    510511            if ($OrderRef == 'yes') {
    511512                $newOrder->businessReference = 'Woocommerce_' . $order->order_key;
     513            }
     514            if ($AllowToOpenPackage == 'yes') {
     515                $newOrder->allowToOpenPackage = true;
    512516            }
    513517            $newOrder->receiver = new stdClass();
     
    794798        }
    795799    }
    796 
    797     $url = BOSTA_ENV_URL .  '/deliveries/awb?ids=' . $ids;
     800    $ids = rtrim($ids, ',');
     801    $url = BOSTA_ENV_URL .  '/admin/deliveries/printawb?ids=' . $ids . '&lang=ar';
    798802    $result = wp_remote_get($url, array(
    799803        'timeout' => 30,
     
    10501054                        'type' => 'checkbox',
    10511055                        'default' => 'yes',
     1056                    ),
     1057                    'AllowToOpenPackage' => array(
     1058                        'label' => 'Allow Customer to open package',
     1059                        'title' => __('Allow to open package', 'bosta'),
     1060                        'type' => 'checkbox',
     1061                        'default' => 'no',
    10521062                    ),
    10531063                );
  • bosta-woocommerce/trunk/readme.txt

    r2839121 r2857320  
    77Requires PHP: 7.0
    88Tested up to: 6.1.1
    9 Stable tag: 2.9.4
     9Stable tag: 2.9.5
    1010WC requires at least: 2.6
    1111WC tested up to: 7.2.2
     
    141141= 2.9.4 =
    142142* Security enhancements
     143
     144= 2.9.5 =
     145* Add Allow to Open Package Option
Note: See TracChangeset for help on using the changeset viewer.