🔒 EXCLUSIVE: Changeset/ - Complete Album!

Changeset 3175584


Ignore:
Timestamp:
10/25/2024 10:37:23 AM (14 months ago)
Author:
biteship
Message:

release version 3.2.0

Location:
biteship/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • biteship/trunk/README.txt

    r3153259 r3175584  
    55Requires at least: 4.0
    66Tested up to: 6.6.1
    7 Stable tag: 3.1.0
     7Stable tag: 3.2.0
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    109109
    110110== Changelog ==
     111= 3.2.0 =
     112* Update new tracking page url
    111113= 3.1.0 =
    112114* Update tracking page url
  • biteship/trunk/admin/js/biteship-admin.js

    r3153259 r3175584  
    333333          if (data.courier && data.courier.waybill_id) {
    334334            var waybillId = data.courier.waybill_id;
     335            var link = data.courier.link
    335336            var biteshipStatus = data.status;
    336337            biteshipWaybillTd.append(`<mark class="order-status biteship-tips" data-tip="Biteship status: ${data.status}"><span>${waybillId}</span></mark>`);
    337338            biteshipStatusTd.append(`<mark class="order-status"><span>${biteshipStatus}</span></mark>`);
    338             biteshipStatusTd.append(createShipmentTrackingButton(waybillId));
     339            biteshipStatusTd.append(createShipmentTrackingButton(link));
    339340
    340341            var deleteButton = createDeleteShipmentButton(waybillId, orderId, biteshipStatus);
     
    479480  }
    480481
    481   function createShipmentTrackingButton(waybill_id) {
    482     if (phpVars.trackingPageUrl.length > 0 && phpVars.trackingPageIsactive) {
    483       var createButton = $(`<a class="button" target="_blank" rel="noopener noreferrer" href="${phpVars.trackingPageUrl}&waybill_id=${waybill_id}" style="margin-top: 10px;">Lacak</a>`);
     482  function createShipmentTrackingButton(link) {
     483    if (phpVars.trackingPageIsactive) {
     484      var createButton = $(`<a class="button" target="_blank" rel="noopener noreferrer" href="${link}" style="margin-top: 10px;">Lacak</a>`);
    484485      createButton.click(function (event) {
    485486        var disabled = $(this).attr("disabled");
     
    581582            waybill_id: response.data.waybill_id,
    582583            waybill_url: phpVars.trackingPageUrl,
     584            link: response.data.link
    583585          },
    584586        });
  • biteship/trunk/admin/views/modal_tracking_biteship.php

    r3153259 r3175584  
    3434                <footer>
    3535                    <div class="inner">
    36                         <button onclick="redirectPageTracking('{{{ data.waybill_id }}}', '{{{ data.waybill_url }}}')" class="button button-primary button-large"><?php esc_html_e(
     36                        <button onclick="redirectPageTracking('{{{ data.link }}}')" class="button button-primary button-large"><?php esc_html_e(
    3737                            "Cek Order",
    3838                            "woocommerce"
     
    4646</script>
    4747<script>
    48     function redirectPageTracking(waybill_id, waybill_url){
    49         window.open( waybill_url+"&waybill_id="+waybill_id, '_blank');
     48    function redirectPageTracking(link){
     49        window.open( link, '_blank');
    5050    }
    5151</script>
  • biteship/trunk/biteship.php

    r3153259 r3175584  
    1717 * Plugin URI:        https://biteship.com/
    1818 * Description:       Pengiriman menjadi lebih mudah dengan layanan cek ongkos kirim dan penjemputan barang langsung ke lokasi yang dibantu oleh lebih dari 20 ekspedisi. Nikmati fitur ini hanya di Biteship for WooCommerce.
    19  * Version:           3.1.0
     19 * Version:           3.2.0
    2020 * Author:            Biteship
    2121 * Author URI:        https://biteship.com/
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define("BITESHIP_VERSION", "3.1.0");
     38define("BITESHIP_VERSION", "3.2.0");
    3939
    4040define("BITESHIP_PLUGIN_PATH", plugin_dir_path(__FILE__));
  • biteship/trunk/public/class-biteship-public.php

    r3088396 r3175584  
    330330        $order_id = (int) $_POST["orderId"];
    331331        $waybill_id = "";
     332        $link = "";
    332333        if ($order_id > 0) {
    333334            $order = wc_get_order($order_id);
     
    337338                if (strlen($biteship_order_id) > 0) {
    338339                    $biteship_shipping = $this->get_biteship_shipping();
    339                     $waybill_id = $biteship_shipping->rest_adapter->get_biteship_order($biteship_order_id)["courier"]["waybill_id"];
     340                    $biteship_order = $biteship_shipping->rest_adapter->get_biteship_order($biteship_order_id);
     341                    $waybill_id = $biteship_order["courier"]["waybill_id"];
     342                    $link = $biteship_order["courier"]["link"];
    340343                }
    341344            }
     
    343346        $response["order_id"] = $order_id;
    344347        $response["waybill_id"] = $waybill_id;
     348        $response["link"] = $link;
    345349        wp_send_json_success($response);
    346350    }
  • biteship/trunk/public/js/biteship-public.js

    r3153259 r3175584  
    542542              if (response.data.waybill_id.length > 0) {
    543543                component.append(
    544                   `<a href="${phpVars.trackingPageUrl}&waybill_id=${response.data.waybill_id}" target="_blank" class="woocommerce-button wp-element-button button view">TRACK</a>`,
     544                  `<a href="${response.data.link}" target="_blank" class="woocommerce-button wp-element-button button view">TRACK</a>`,
    545545                  [btnView],
    546546                );
Note: See TracChangeset for help on using the changeset viewer.