Plugin Directory

Changeset 3196211


Ignore:
Timestamp:
11/25/2024 08:42:32 AM (17 months ago)
Author:
cod24
Message:
  • Bugs fixes and improvements
Location:
cod24-shipping
Files:
22 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • cod24-shipping/trunk/cod24-shipping.php

    r3191219 r3196211  
    33Plugin Name: COD24 Shipping For Woocommerce
    44Description: This plugin is adding COD24 shipping methods to woocommerce.
    5 Version: 3.4
     5Version: 3.4.1
    66Author: COD24
    77Author URI: https://cod24.ir
     
    2727        public function __construct()
    2828        {
    29             define('COD24_PLUGIN_VERSION', '3.4');
     29            define('COD24_PLUGIN_VERSION', '3.4.1');
    3030            define('COD24_PLUGIN_DIR', plugin_dir_path(__FILE__));
    3131            define('COD24_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cod24-shipping/trunk/inc/class-cod24-woo.php

    r3191219 r3196211  
    111111
    112112            // Check if we are on the WooCommerce Orders pages
    113             if ($hook === 'edit.php' && isset($_GET['post_type']) && $_GET['post_type'] === 'shop_order' || $hook === 'woocommerce_page_wc-orders')
     113            if ($hook === 'post.php' && isset($_GET['post']) && get_post_type( absint( $_GET['post'] ) ) === 'shop_order' || $hook === 'woocommerce_page_wc-orders')
    114114            {
    115115                wp_enqueue_style('sweetalert2', COD24_PLUGIN_URL . 'assets/css/sweetalert2.css', array(), COD24_PLUGIN_VERSION);
     
    399399        public function order_detail_callback( $post_or_order_object )
    400400        {
    401             $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
     401            $order_id = ( get_class($post_or_order_object) === 'WP_Post' ) ? $post_or_order_object->ID : $post_or_order_object->get_id();
     402            $order = wc_get_order( $order_id );
    402403            $order_cod24_serial = $order->get_meta('_cod24_serial', true) ? $order->get_meta('_cod24_serial', true) : '';
    403404            $order_cod24_barcode = $order->get_meta('_cod24_barcode', true) ? $order->get_meta('_cod24_barcode', true) : '';
     
    988989                    /* translators: %s is the post serial */
    989990                    $serial_output = sprintf(
    990                         esc_attr__("Serial: <strong>%s</strong>", 'cod24-shipping'),
     991                        __("Serial: <strong>%s</strong>", 'cod24-shipping'),
    991992                        !empty($cod24_serial) ? esc_attr($cod24_serial) : '-'
    992993                    );
     
    996997                    /* translators: %s is the post barcode */
    997998                    $barcode_output = sprintf(
    998                         esc_attr__("<br />Post Barcode: <strong>%s</strong>", 'cod24-shipping'),
     999                        __("<br />Post Barcode: <strong>%s</strong>", 'cod24-shipping'),
    9991000                        !empty($cod24_barcode) ? esc_attr($cod24_barcode) : '-'
    10001001                    );
  • cod24-shipping/trunk/readme.txt

    r3191219 r3196211  
    11=== COD24 Shipping For Woocommerce ===
    22Contributors: cod24, vadatiertebat
    3 Tags: cod24, woocommerce shipping, cod24 shipping, shipping method, post, tipax
     3Tags: cod24, delivery, tipax, woocommerce shipping, shipping method
    44Requires at least: 5.0
    55Tested up to: 6.7
    6 Stable tag: 3.4
     6Stable tag: 3.4.1
    77License: GPL-2.0+
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.