Plugin Directory

Changeset 3399074


Ignore:
Timestamp:
11/19/2025 03:10:47 PM (3 months ago)
Author:
jneshipping
Message:

Update Version to 1.1.0 - add dashboard

Location:
jne-shipping-official
Files:
10 added
9 edited
22 copied

Legend:

Unmodified
Added
Removed
  • jne-shipping-official/tags/1.1.0/admin/class-jne-woocommerce-admin.php

    r3387194 r3399074  
    112112    require_once plugin_dir_path(dirname(__FILE__)) . 'admin/includes/class-jne-admin-generate-cnote.php';
    113113    require_once plugin_dir_path(dirname(__FILE__)) . 'admin/includes/class-jne-admin-generate-awb.php';
     114    require_once plugin_dir_path(dirname(__FILE__)) . 'admin/includes/class-jne-admin-dashboard.php';
    114115  }
    115116
     
    365366    add_submenu_page(
    366367      'jneshof-landing',
     368      __('Dashboard', 'jne-shipping-official'),
     369      __('Dashboard', 'jne-shipping-official'),
     370      'manage_options',
     371      'jneshof-dashboard',
     372      [$this, 'display_dashboard_page']
     373    );
     374    add_submenu_page(
     375      'jneshof-landing',
    367376      __('Pengaturan Akses', 'jne-shipping-official'),
    368377      __('Pengaturan Akses', 'jne-shipping-official'),
     
    381390    add_submenu_page(
    382391      'jneshof-landing',
     392      __('Webhook Logs', 'jne-shipping-official'),
     393      __('Webhook Logs', 'jne-shipping-official'),
     394      'manage_options',
     395      'jneshof-webhook-logs',
     396      [$this, 'display_webhook_logs_page']
     397    );
     398    add_submenu_page(
     399      'jneshof-landing',
    383400      __('Bantuan', 'jne-shipping-official'),
    384401      __('Bantuan', 'jne-shipping-official'),
     
    422439  {
    423440    return include_once plugin_dir_path(__FILE__) . 'partials/jne-woocommerce-admin-support-display.php';
     441  }
     442
     443  public function display_webhook_logs_page()
     444  {
     445    return include_once plugin_dir_path(__FILE__) . 'partials/jne-woocommerce-admin-webhook-logs-display.php';
     446  }
     447
     448  public function display_dashboard_page()
     449  {
     450    return include_once plugin_dir_path(__FILE__) . 'partials/jne-woocommerce-admin-dashboard-display.php';
    424451  }
    425452
  • jne-shipping-official/tags/1.1.0/admin/includes/class-jne-admin-order-helper.php

    r3398965 r3399074  
    535535
    536536  /**
     537   * Get JNE shipping status.
     538   * @return string|null
     539   */
     540  public function getJNEShippingStatus(): ?string
     541  {
     542    return $this->getOrderMetaValue('jneshof_shipping_status');
     543  }
     544
     545  /**
    537546   * Save JNE pickup number.
    538547   * @param string $pickup_number
  • jne-shipping-official/tags/1.1.0/admin/includes/class-jne-admin-order-list.php

    r3391700 r3399074  
    405405    }
    406406
     407    // Save shipping status from API response if pod_status exists
     408    if (isset($response['data']['cnote']['pod_status']) && !empty($response['data']['cnote']['pod_status'])) {
     409      $order_helper = Jneshof_Order_Helper::getOrderByID($order_id);
     410      if ($order_helper) {
     411        $pod_status = $response['data']['cnote']['pod_status'];
     412        // Get WC_Order object from helper
     413        $wc_order = wc_get_order($order_id);
     414        if ($wc_order) {
     415          Jneshof_Woocommerce_Webhook::save_shipping_status_from_api($wc_order, $pod_status);
     416        }
     417      }
     418    }
     419
    407420    wp_send_json_success($response);
    408421  }
  • jne-shipping-official/tags/1.1.0/composer.json

    r3398965 r3399074  
    22    "name": "jne-shipping/jne-shipping-official",
    33    "description": "WordPress plugin integrated with WooCommerce for JNE shipping services",
    4     "version": "1.0.12",
     4    "version": "1.1.0",
    55    "type": "wordpress-plugin",
    66    "license": "GPL-2.0+",
  • jne-shipping-official/tags/1.1.0/includes/class-jne-woocommerce.php

    r3387194 r3399074  
    134134        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jne-woocommerce-alert.php';
    135135
     136        /**
     137         * The class responsible for handling webhook requests from JNE.
     138         */
     139        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jne-woocommerce-webhook.php';
     140
     141        /**
     142         * The class responsible for logging webhook requests.
     143         */
     144        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jne-woocommerce-webhook-logger.php';
     145
    136146        $this->loader = new Jneshof_Woocommerce_Loader();
    137147
     
    175185        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    176186
     187        // Register webhook REST API routes
     188        $webhook_handler = Jneshof_Woocommerce_Webhook::get_instance();
     189        $this->loader->add_action( 'rest_api_init', $webhook_handler, 'register_routes' );
     190
    177191    }
    178192
  • jne-shipping-official/tags/1.1.0/jne-shipping-official.php

    r3398965 r3399074  
    2020 * Plugin Name:       JNE Shipping Official
    2121 * Description:       WordPress plugin integrated with WooCommerce for JNE shipping services
    22  * Version:           1.0.12
     22 * Version:           1.1.0
    2323 * Author:            PT. Tiki Jalur Nugraha Ekakurir
    2424 * Author URI:        https://jne.co.id/
     
    4848 * Rename this for your plugin and update it as you release new versions.
    4949 */
    50 define('JNESHOF_PLUGIN_VERSION', '1.0.12');
     50define('JNESHOF_PLUGIN_VERSION', '1.1.0');
    5151
    5252/**
  • jne-shipping-official/tags/1.1.0/readme.txt

    r3398965 r3399074  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0.12
     8Stable tag: 1.1.0
    99License: GPL-2.0+
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    9191== Changelog ==
    9292
     93= 1.1.0 =
     94* Added JNE Shipping Dashboard with comprehensive analytics
     95* Added Shipping Status Statistics showing distribution of shipping statuses (MENUNGGU PICKUP, SUCCESS PICKUP, FAILED PICKUP, SHIPPED, DELIVERED, SHIPMENT PROBLEM, RETURN TO SHIPPER) with total orders and percentage
     96* Added Aging Shipment tracking for orders 3-7 days, 8-14 days, and >15 days (excluding DELIVERED and RETURN TO SHIPPER)
     97* Added Shipping Cost Statistics showing total shipping costs for completed orders, delivered orders, and non-delivered orders
     98* Added Top Destinations analysis showing most popular shipping destinations by city and province
     99* Added Top JNE Services analysis showing most used JNE service codes
     100* Added date range filter (default: current month) and payment type filter (COD/Non-COD) for dashboard
     101* Dashboard only shows orders with completed status
     102
    93103= 1.0.12 =
    94104* Added fallback to billing phone when shipping phone is empty in AWB and CNote generation
     
    155165== Upgrade Notice ==
    156166
     167= 1.1.0 =
     168Major update: Added comprehensive JNE Shipping Dashboard with analytics including Shipping Status Statistics, Aging Shipment tracking, Shipping Cost Statistics, Top Destinations, and Top JNE Services. Includes date range and payment type filters. Dashboard provides valuable insights into your shipping operations. Recommended for all users.
     169
    157170= 1.0.12 =
    158171Improved phone number handling: Added automatic fallback to billing phone when shipping phone is not available during AWB and CNote generation. This ensures better data completeness for shipping labels. Recommended for all users.
  • jne-shipping-official/trunk/admin/class-jne-woocommerce-admin.php

    r3387194 r3399074  
    112112    require_once plugin_dir_path(dirname(__FILE__)) . 'admin/includes/class-jne-admin-generate-cnote.php';
    113113    require_once plugin_dir_path(dirname(__FILE__)) . 'admin/includes/class-jne-admin-generate-awb.php';
     114    require_once plugin_dir_path(dirname(__FILE__)) . 'admin/includes/class-jne-admin-dashboard.php';
    114115  }
    115116
     
    365366    add_submenu_page(
    366367      'jneshof-landing',
     368      __('Dashboard', 'jne-shipping-official'),
     369      __('Dashboard', 'jne-shipping-official'),
     370      'manage_options',
     371      'jneshof-dashboard',
     372      [$this, 'display_dashboard_page']
     373    );
     374    add_submenu_page(
     375      'jneshof-landing',
    367376      __('Pengaturan Akses', 'jne-shipping-official'),
    368377      __('Pengaturan Akses', 'jne-shipping-official'),
     
    381390    add_submenu_page(
    382391      'jneshof-landing',
     392      __('Webhook Logs', 'jne-shipping-official'),
     393      __('Webhook Logs', 'jne-shipping-official'),
     394      'manage_options',
     395      'jneshof-webhook-logs',
     396      [$this, 'display_webhook_logs_page']
     397    );
     398    add_submenu_page(
     399      'jneshof-landing',
    383400      __('Bantuan', 'jne-shipping-official'),
    384401      __('Bantuan', 'jne-shipping-official'),
     
    422439  {
    423440    return include_once plugin_dir_path(__FILE__) . 'partials/jne-woocommerce-admin-support-display.php';
     441  }
     442
     443  public function display_webhook_logs_page()
     444  {
     445    return include_once plugin_dir_path(__FILE__) . 'partials/jne-woocommerce-admin-webhook-logs-display.php';
     446  }
     447
     448  public function display_dashboard_page()
     449  {
     450    return include_once plugin_dir_path(__FILE__) . 'partials/jne-woocommerce-admin-dashboard-display.php';
    424451  }
    425452
  • jne-shipping-official/trunk/admin/includes/class-jne-admin-order-helper.php

    r3398965 r3399074  
    535535
    536536  /**
     537   * Get JNE shipping status.
     538   * @return string|null
     539   */
     540  public function getJNEShippingStatus(): ?string
     541  {
     542    return $this->getOrderMetaValue('jneshof_shipping_status');
     543  }
     544
     545  /**
    537546   * Save JNE pickup number.
    538547   * @param string $pickup_number
  • jne-shipping-official/trunk/admin/includes/class-jne-admin-order-list.php

    r3391700 r3399074  
    405405    }
    406406
     407    // Save shipping status from API response if pod_status exists
     408    if (isset($response['data']['cnote']['pod_status']) && !empty($response['data']['cnote']['pod_status'])) {
     409      $order_helper = Jneshof_Order_Helper::getOrderByID($order_id);
     410      if ($order_helper) {
     411        $pod_status = $response['data']['cnote']['pod_status'];
     412        // Get WC_Order object from helper
     413        $wc_order = wc_get_order($order_id);
     414        if ($wc_order) {
     415          Jneshof_Woocommerce_Webhook::save_shipping_status_from_api($wc_order, $pod_status);
     416        }
     417      }
     418    }
     419
    407420    wp_send_json_success($response);
    408421  }
  • jne-shipping-official/trunk/composer.json

    r3398965 r3399074  
    22    "name": "jne-shipping/jne-shipping-official",
    33    "description": "WordPress plugin integrated with WooCommerce for JNE shipping services",
    4     "version": "1.0.12",
     4    "version": "1.1.0",
    55    "type": "wordpress-plugin",
    66    "license": "GPL-2.0+",
  • jne-shipping-official/trunk/includes/class-jne-woocommerce.php

    r3387194 r3399074  
    134134        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jne-woocommerce-alert.php';
    135135
     136        /**
     137         * The class responsible for handling webhook requests from JNE.
     138         */
     139        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jne-woocommerce-webhook.php';
     140
     141        /**
     142         * The class responsible for logging webhook requests.
     143         */
     144        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jne-woocommerce-webhook-logger.php';
     145
    136146        $this->loader = new Jneshof_Woocommerce_Loader();
    137147
     
    175185        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    176186
     187        // Register webhook REST API routes
     188        $webhook_handler = Jneshof_Woocommerce_Webhook::get_instance();
     189        $this->loader->add_action( 'rest_api_init', $webhook_handler, 'register_routes' );
     190
    177191    }
    178192
  • jne-shipping-official/trunk/jne-shipping-official.php

    r3398965 r3399074  
    2020 * Plugin Name:       JNE Shipping Official
    2121 * Description:       WordPress plugin integrated with WooCommerce for JNE shipping services
    22  * Version:           1.0.12
     22 * Version:           1.1.0
    2323 * Author:            PT. Tiki Jalur Nugraha Ekakurir
    2424 * Author URI:        https://jne.co.id/
     
    4848 * Rename this for your plugin and update it as you release new versions.
    4949 */
    50 define('JNESHOF_PLUGIN_VERSION', '1.0.12');
     50define('JNESHOF_PLUGIN_VERSION', '1.1.0');
    5151
    5252/**
  • jne-shipping-official/trunk/readme.txt

    r3398965 r3399074  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0.12
     8Stable tag: 1.1.0
    99License: GPL-2.0+
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    9191== Changelog ==
    9292
     93= 1.1.0 =
     94* Added JNE Shipping Dashboard with comprehensive analytics
     95* Added Shipping Status Statistics showing distribution of shipping statuses (MENUNGGU PICKUP, SUCCESS PICKUP, FAILED PICKUP, SHIPPED, DELIVERED, SHIPMENT PROBLEM, RETURN TO SHIPPER) with total orders and percentage
     96* Added Aging Shipment tracking for orders 3-7 days, 8-14 days, and >15 days (excluding DELIVERED and RETURN TO SHIPPER)
     97* Added Shipping Cost Statistics showing total shipping costs for completed orders, delivered orders, and non-delivered orders
     98* Added Top Destinations analysis showing most popular shipping destinations by city and province
     99* Added Top JNE Services analysis showing most used JNE service codes
     100* Added date range filter (default: current month) and payment type filter (COD/Non-COD) for dashboard
     101* Dashboard only shows orders with completed status
     102
    93103= 1.0.12 =
    94104* Added fallback to billing phone when shipping phone is empty in AWB and CNote generation
     
    155165== Upgrade Notice ==
    156166
     167= 1.1.0 =
     168Major update: Added comprehensive JNE Shipping Dashboard with analytics including Shipping Status Statistics, Aging Shipment tracking, Shipping Cost Statistics, Top Destinations, and Top JNE Services. Includes date range and payment type filters. Dashboard provides valuable insights into your shipping operations. Recommended for all users.
     169
    157170= 1.0.12 =
    158171Improved phone number handling: Added automatic fallback to billing phone when shipping phone is not available during AWB and CNote generation. This ensures better data completeness for shipping labels. Recommended for all users.
Note: See TracChangeset for help on using the changeset viewer.