' .
esc_html($tracking_number) . ''
);
@@ -191,14 +222,14 @@ class CZL_Tracking {
// 显示子单号
$child_numbers = $order->get_meta('_czl_child_numbers');
if (!empty($child_numbers)) {
- echo '
';
}
// 显示参考号
$reference_number = $order->get_meta('_czl_reference_number');
if (!empty($reference_number)) {
- echo '
';
}
@@ -208,32 +239,32 @@ class CZL_Tracking {
$remote_text = '';
switch ($is_remote) {
case 'Y':
- $remote_text = __('偏远地区', 'woo-czl-express');
+ $remote_text = esc_html__('偏远地区', 'czlexpress-for-woocommerce');
break;
case 'A':
- $remote_text = __('FedEx偏远A级', 'woo-czl-express');
+ $remote_text = esc_html__('FedEx偏远A级', 'czlexpress-for-woocommerce');
break;
case 'B':
- $remote_text = __('FedEx偏远B级', 'woo-czl-express');
+ $remote_text = esc_html__('FedEx偏远B级', 'czlexpress-for-woocommerce');
break;
case 'C':
- $remote_text = __('FedEx偏远C级', 'woo-czl-express');
+ $remote_text = esc_html__('FedEx偏远C级', 'czlexpress-for-woocommerce');
break;
case 'N':
- $remote_text = __('非偏远地区', 'woo-czl-express');
+ $remote_text = esc_html__('非偏远地区', 'czlexpress-for-woocommerce');
break;
}
if ($remote_text) {
- echo '
';
}
}
// 显示住宅信息
$is_residential = $order->get_meta('_czl_is_residential');
if ($is_residential === 'Y') {
- echo '
';
}
// 显示轨迹信息
@@ -241,7 +272,7 @@ class CZL_Tracking {
if (!empty($tracking_history['trackDetails'])) {
?>
-
+
diff --git a/includes/class-woo-czl-express.php b/includes/class-czlexpress.php
similarity index 76%
rename from includes/class-woo-czl-express.php
rename to includes/class-czlexpress.php
index 5080577..fce49d7 100644
--- a/includes/class-woo-czl-express.php
+++ b/includes/class-czlexpress.php
@@ -1,5 +1,8 @@
init();
add_action('admin_init', array($this, 'register_settings'));
add_action('wp_ajax_czl_test_connection', array($this, 'handle_test_connection'));
@@ -39,7 +41,7 @@ class WooCzlExpress {
// 添加状态迁移钩子
add_action('init', array($this, 'migrate_order_statuses'), 20);
- // 保留批量创建功能,因为这是我们自己的订单管理页面的功能
+ // 保留批量创建功能
add_action('wp_ajax_czl_bulk_create_shipment', array($this, 'handle_bulk_create_shipment'));
}
@@ -58,17 +60,17 @@ class WooCzlExpress {
}
private function load_dependencies() {
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-api.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-rate-calculator.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-shipping-method.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-install.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-settings.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-order-handler.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-order-data.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-label.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-tracking.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-product-fields.php';
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-order.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-api.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-rate-calculator.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-shipping-method.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-install.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-settings.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-order-handler.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-order-data.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-label.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-tracking.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-product-fields.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-order.php';
}
private function init_hooks() {
@@ -91,7 +93,7 @@ class WooCzlExpress {
public function init_shipping_method() {
if (!class_exists('WC_CZL_Shipping_Method')) {
- require_once WOO_CZL_EXPRESS_PATH . 'includes/class-czl-shipping-method.php';
+ require_once CZL_EXPRESS_PATH . 'includes/class-czl-shipping-method.php';
}
}
@@ -104,45 +106,45 @@ class WooCzlExpress {
public function add_admin_menu() {
add_menu_page(
- __('CZL Express', 'woo-czl-express'),
- __('CZL Express', 'woo-czl-express'),
+ esc_html__('CZL Express', 'czlexpress-for-woocommerce'),
+ esc_html__('CZL Express', 'czlexpress-for-woocommerce'),
'manage_woocommerce',
- 'woo-czl-express',
+ 'czlexpress-for-woocommerce',
array($this, 'render_settings_page'),
'dashicons-airplane'
);
add_submenu_page(
- 'woo-czl-express',
- __('基本设置', 'woo-czl-express'),
- __('基本设置', 'woo-czl-express'),
+ 'czlexpress-for-woocommerce',
+ esc_html__('基本设置', 'czlexpress-for-woocommerce'),
+ esc_html__('基本设置', 'czlexpress-for-woocommerce'),
'manage_woocommerce',
- 'woo-czl-express',
+ 'czlexpress-for-woocommerce',
array($this, 'render_settings_page')
);
add_submenu_page(
- 'woo-czl-express',
- __('订单管理', 'woo-czl-express'),
- __('订单管理', 'woo-czl-express'),
+ 'czlexpress-for-woocommerce',
+ esc_html__('订单管理', 'czlexpress-for-woocommerce'),
+ esc_html__('订单管理', 'czlexpress-for-woocommerce'),
'manage_woocommerce',
'czl-express-orders',
array($this, 'render_orders_page')
);
add_submenu_page(
- 'woo-czl-express',
- __('产品分组', 'woo-czl-express'),
- __('产品分组', 'woo-czl-express'),
+ 'czlexpress-for-woocommerce',
+ esc_html__('产品分组', 'czlexpress-for-woocommerce'),
+ esc_html__('产品分组', 'czlexpress-for-woocommerce'),
'manage_options',
'czl-product-groups',
array($this, 'render_product_groups_page')
);
add_submenu_page(
- 'woo-czl-express',
- __('汇率设置', 'woo-czl-express'),
- __('汇率设置', 'woo-czl-express'),
+ 'czlexpress-for-woocommerce',
+ esc_html__('汇率设置', 'czlexpress-for-woocommerce'),
+ esc_html__('汇率设置', 'czlexpress-for-woocommerce'),
'manage_options',
'czl-exchange-rates',
array($this, 'render_exchange_rates_page')
@@ -171,15 +173,15 @@ class WooCzlExpress {
}
update_option('czl_product_groups', $groups);
- add_settings_error('czl_messages', 'czl_message', __('产品分组设置已保存', 'woo-czl-express'), 'updated');
+ add_settings_error('czl_messages', 'czl_message', esc_html__('产品分组设置已保存', 'czlexpress-for-woocommerce'), 'updated');
}
// 显示设置页面
- require_once WOO_CZL_EXPRESS_PATH . 'admin/views/product-groups.php';
+ require_once CZL_EXPRESS_PATH . 'admin/views/product-groups.php';
}
public function admin_page() {
- require_once WOO_CZL_EXPRESS_PATH . 'admin/views/admin-page.php';
+ require_once CZL_EXPRESS_PATH . 'admin/views/admin-page.php';
}
/**
@@ -190,9 +192,9 @@ class WooCzlExpress {
$tracking_number = get_post_meta($order->get_id(), '_czl_tracking_number', true);
if ($tracking_number) {
- $actions['czl_cancel_shipment'] = __('取消CZL运单', 'woo-czl-express');
+ $actions['czl_cancel_shipment'] = esc_html__('取消CZL运单', 'czlexpress-for-woocommerce');
} else {
- $actions['czl_create_shipment'] = __('创建CZL运单', 'woo-czl-express');
+ $actions['czl_create_shipment'] = esc_html__('创建CZL运单', 'czlexpress-for-woocommerce');
}
return $actions;
@@ -218,7 +220,7 @@ class WooCzlExpress {
// 添加设置分节
add_settings_section(
'czl_api_settings',
- __('API设置', 'woo-czl-express'),
+ esc_html__('API设置', 'czlexpress-for-woocommerce'),
null,
'czl_options'
);
@@ -226,7 +228,7 @@ class WooCzlExpress {
// 添加设置字段
add_settings_field(
'czl_username',
- __('用户名', 'woo-czl-express'),
+ esc_html__('用户名', 'czlexpress-for-woocommerce'),
array($this, 'username_field_callback'),
'czl_options',
'czl_api_settings'
@@ -234,7 +236,7 @@ class WooCzlExpress {
add_settings_field(
'czl_password',
- __('密码', 'woo-czl-express'),
+ esc_html__('密码', 'czlexpress-for-woocommerce'),
array($this, 'password_field_callback'),
'czl_options',
'czl_api_settings'
@@ -243,14 +245,14 @@ class WooCzlExpress {
// 添加运费调整设置分节
add_settings_section(
'czl_rate_settings',
- __('运费设置', 'woo-czl-express'),
+ esc_html__('运费设置', 'czlexpress-for-woocommerce'),
null,
'czl_options'
);
add_settings_field(
'czl_rate_adjustment',
- __('运费调整公式', 'woo-czl-express'),
+ esc_html__('运费调整公式', 'czlexpress-for-woocommerce'),
array($this, 'rate_adjustment_field_callback'),
'czl_options',
'czl_rate_settings'
@@ -272,11 +274,11 @@ class WooCzlExpress {
?>
-
+
- 10% + 10 (运费乘以1.1后加10)
- 20% (运费乘以1.2)
- +15 (运费加15)
-
+
__('请先配置API账号和密码', 'woo-czl-express')
+ 'message' => esc_html__('请先配置API账号和密码', 'czlexpress-for-woocommerce')
));
}
@@ -311,11 +313,11 @@ class WooCzlExpress {
if (!empty($data) && isset($data['code']) && $data['code'] == 200) {
wp_send_json_success(array(
- 'message' => __('API连接测试成功', 'woo-czl-express')
+ 'message' => esc_html__('API连接测试成功', 'czlexpress-for-woocommerce')
));
} else {
wp_send_json_error(array(
- 'message' => __('API连接测试失败,请检查账号密码是否正确', 'woo-czl-express')
+ 'message' => esc_html__('API连接测试失败,请检查账号密码是否正确', 'czlexpress-for-woocommerce')
));
}
}
@@ -326,7 +328,7 @@ class WooCzlExpress {
}
// 显示设置页面
- require_once WOO_CZL_EXPRESS_PATH . 'admin/views/settings.php';
+ require_once CZL_EXPRESS_PATH . 'admin/views/settings.php';
}
public function render_exchange_rates_page() {
@@ -352,11 +354,11 @@ class WooCzlExpress {
}
}
- add_settings_error('czl_messages', 'czl_message', __('汇率设置已保存', 'woo-czl-express'), 'updated');
+ add_settings_error('czl_messages', 'czl_message', esc_html__('汇率设置已保存', 'czlexpress-for-woocommerce'), 'updated');
}
// 显示设置页面
- require_once WOO_CZL_EXPRESS_PATH . 'admin/views/exchange-rates.php';
+ require_once CZL_EXPRESS_PATH . 'admin/views/exchange-rates.php';
}
/**
@@ -371,23 +373,31 @@ class WooCzlExpress {
}
register_post_status('wc-in_transit', array(
- 'label' => _x('In Transit', 'Order status', 'woo-czl-express'),
+ 'label' => _x('In Transit', 'Order status', 'czlexpress-for-woocommerce'),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop('In Transit
(%s) ',
- 'In Transit
(%s) ', 'woo-czl-express')
+ /* translators: %s: number of orders in transit */
+ 'label_count' => _n_noop(
+ 'In Transit
(%s) ',
+ 'In Transit
(%s) ',
+ 'czlexpress-for-woocommerce'
+ )
));
register_post_status('wc-delivered', array(
- 'label' => _x('Delivered', 'Order status', 'woo-czl-express'),
+ 'label' => _x('Delivered', 'Order status', 'czlexpress-for-woocommerce'),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop('Delivered
(%s) ',
- 'Delivered
(%s) ', 'woo-czl-express')
+ /* translators: %s: number of delivered orders */
+ 'label_count' => _n_noop(
+ 'Delivered
(%s) ',
+ 'Delivered
(%s) ',
+ 'czlexpress-for-woocommerce'
+ )
));
$registered = true;
@@ -405,8 +415,8 @@ class WooCzlExpress {
}
$new_statuses = array(
- 'wc-in_transit' => _x('In Transit', 'Order status', 'woo-czl-express'),
- 'wc-delivered' => _x('Delivered', 'Order status', 'woo-czl-express')
+ 'wc-in_transit' => _x('In Transit', 'Order status', 'czlexpress-for-woocommerce'),
+ 'wc-delivered' => _x('Delivered', 'Order status', 'czlexpress-for-woocommerce')
);
$order_statuses = array_merge($order_statuses, $new_statuses);
@@ -430,12 +440,12 @@ class WooCzlExpress {
}
?>
-
+
' .
esc_html($tracking_number) . ''
);
@@ -483,11 +493,11 @@ class WooCzlExpress {
?>
-
+
' .
esc_html($tracking_number) . ''
);
@@ -504,13 +514,13 @@ class WooCzlExpress {
// 检查权限
if (!current_user_can('manage_woocommerce')) {
- throw new Exception(__('权限不足', 'woo-czl-express'));
+ throw new Exception(esc_html__('权限不足', 'czlexpress-for-woocommerce'));
}
// 验证订单ID
$order_id = isset($_POST['order_id']) ? absint($_POST['order_id']) : 0;
if (!$order_id) {
- throw new Exception(__('无效的订单ID', 'woo-czl-express'));
+ throw new Exception(esc_html__('无效的订单ID', 'czlexpress-for-woocommerce'));
}
// 获取WooCommerce订单对象
@@ -525,7 +535,7 @@ class WooCzlExpress {
if (!empty($result['tracking_number'])) {
wp_send_json_success(array(
- 'message' => __('运单创建成功', 'woo-czl-express'),
+ 'message' => esc_html__('运单创建成功', 'czlexpress-for-woocommerce'),
'tracking_number' => $result['tracking_number']
));
} else {
@@ -537,14 +547,14 @@ class WooCzlExpress {
if (isset($order)) {
$order->add_order_note(
sprintf(
- __('CZL Express运单创建失败: %s', 'woo-czl-express'),
+ esc_html__('CZL Express运单创建失败: %s', 'czlexpress-for-woocommerce'),
$e->getMessage()
),
true
);
}
wp_send_json_error(array(
- 'message' => $e->getMessage() // 直接返回错误信息
+ 'message' => $e->getMessage()
));
}
}
@@ -558,13 +568,13 @@ class WooCzlExpress {
check_ajax_referer('czl_bulk_create_shipment', 'nonce');
if (!current_user_can('manage_woocommerce')) {
- throw new Exception(__('权限不足', 'woo-czl-express'));
+ throw new Exception(esc_html__('权限不足', 'czlexpress-for-woocommerce'));
}
// 获取订单ID
$order_ids = isset($_POST['order_ids']) ? array_map('intval', (array)$_POST['order_ids']) : array();
if (empty($order_ids)) {
- throw new Exception(__('请选择订单', 'woo-czl-express'));
+ throw new Exception(esc_html__('请选择订单', 'czlexpress-for-woocommerce'));
}
$success = 0;
@@ -589,7 +599,7 @@ class WooCzlExpress {
wp_send_json_success(array(
'message' => sprintf(
- __('处理完成。成功:%d,失败:%d', 'woo-czl-express'),
+ esc_html__('处理完成。成功:%1$d,失败:%2$d', 'czlexpress-for-woocommerce'),
$success,
$failed
),
@@ -609,11 +619,11 @@ class WooCzlExpress {
public function render_orders_page() {
// 检查权限
if (!current_user_can('manage_woocommerce')) {
- wp_die(__('您没有足够的权限访问此页面', 'woo-czl-express'));
+ wp_die(esc_html__('您没有足够的权限访问此页面', 'czlexpress-for-woocommerce'));
}
// 加载订单列表页面模板
- require_once WOO_CZL_EXPRESS_PATH . 'admin/views/orders.php';
+ require_once CZL_EXPRESS_PATH . 'admin/views/orders.php';
}
/**
diff --git a/includes/class-wc-czlexpress-order.php b/includes/class-wc-czlexpress-order.php
deleted file mode 100644
index de91735..0000000
--- a/includes/class-wc-czlexpress-order.php
+++ /dev/null
@@ -1,27 +0,0 @@
-class WC_CZLExpress_Order {
-
- public function save_tracking_info($order_id, $tracking_number, $label_url) {
- // 使用新的HPOS API保存跟踪信息
- $order = wc_get_order($order_id);
-
- if ($order) {
- // 使用新的元数据API
- $order->update_meta_data('_czlexpress_tracking_number', $tracking_number);
- $order->update_meta_data('_czlexpress_label_url', $label_url);
- $order->save();
- }
- }
-
- public function get_tracking_info($order_id) {
- $order = wc_get_order($order_id);
-
- if ($order) {
- return array(
- 'tracking_number' => $order->get_meta('_czlexpress_tracking_number'),
- 'label_url' => $order->get_meta('_czlexpress_label_url')
- );
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/includes/class-wc-czlexpress-orders-list.php b/includes/class-wc-czlexpress-orders-list.php
deleted file mode 100644
index 8b80b53..0000000
--- a/includes/class-wc-czlexpress-orders-list.php
+++ /dev/null
@@ -1,13 +0,0 @@
-class WC_CZLExpress_Orders_List {
-
- public function get_orders($args = array()) {
- // 使用新的订单查询API
- $query = new \Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableQuery($args);
- return $query->get_orders();
- }
-
- public function get_order_items($order_id) {
- $order = wc_get_order($order_id);
- return $order ? $order->get_items() : array();
- }
-}
\ No newline at end of file
diff --git a/includes/class-wc-czlexpress-shipping.php b/includes/class-wc-czlexpress-shipping.php
deleted file mode 100644
index b0f72b1..0000000
--- a/includes/class-wc-czlexpress-shipping.php
+++ /dev/null
@@ -1,16 +0,0 @@
-class WC_CZLExpress_Shipping {
-
- public function get_shipping_info($order_id) {
- $order = wc_get_order($order_id);
-
- if ($order) {
- return array(
- 'weight' => $order->get_meta('_czlexpress_weight'),
- 'remote_fee' => $order->get_meta('_czlexpress_remote_fee'),
- 'shipping_method' => $order->get_meta('_czlexpress_shipping_method')
- );
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/languages/czlexpress-for-woocommerce.pot b/languages/czlexpress-for-woocommerce.pot
new file mode 100644
index 0000000..a7cc75a
--- /dev/null
+++ b/languages/czlexpress-for-woocommerce.pot
@@ -0,0 +1,120 @@
+# Copyright (C) 2024 CZL Express
+# This file is distributed under the GPL v2 or later.
+msgid ""
+msgstr ""
+"Project-Id-Version: CZL Express for WooCommerce 1.0.0\n"
+"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/czlexpress-for-woocommerce\n"
+"Last-Translator: woodchen \n"
+"Language-Team: woodchen \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"POT-Creation-Date: 2024-12-20T10:00:00+00:00\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"X-Generator: WP-CLI 2.8.1\n"
+"X-Domain: czlexpress-for-woocommerce\n"
+
+#. Plugin Name of the plugin
+msgid "CZL Express for WooCommerce"
+msgstr ""
+
+#. Plugin URI of the plugin
+msgid "https://exp.czl.net"
+msgstr ""
+
+#. Description of the plugin
+msgid "CZL Express shipping integration for WooCommerce. Provides real-time shipping rates, shipment creation, and package tracking for CZL Express delivery service."
+msgstr ""
+
+#. Author of the plugin
+msgid "CZL Express"
+msgstr ""
+
+#. Author URI of the plugin
+msgid "https://exp.czl.net"
+msgstr ""
+
+#: czlexpress-for-woocommerce.php:89
+msgid "CZL Express requires WooCommerce to be installed and active"
+msgstr ""
+
+#: czlexpress-for-woocommerce.php:99
+msgid "CZL Express requires WooCommerce 6.0.0 or higher"
+msgstr ""
+
+#: includes/class-czlexpress.php:123
+msgid "Settings"
+msgstr ""
+
+#: includes/class-czlexpress.php:124
+msgid "Documentation"
+msgstr ""
+
+#: includes/class-czlexpress.php:125
+msgid "Support"
+msgstr ""
+
+#: includes/class-czl-order.php:156
+msgid "Package created successfully"
+msgstr ""
+
+#: includes/class-czl-order.php:158
+msgid "Failed to create package"
+msgstr ""
+
+#: includes/class-czl-order.php:187
+msgid "Tracking information updated successfully"
+msgstr ""
+
+#: includes/class-czl-order.php:189
+msgid "Failed to update tracking information"
+msgstr ""
+
+#: includes/class-czl-order.php:234
+msgctxt "Order status"
+msgid "In Transit"
+msgstr ""
+
+#: includes/class-czl-settings.php:45
+msgid "CZL Express API Settings"
+msgstr ""
+
+#: includes/class-czl-settings.php:52
+msgid "Enable/Disable"
+msgstr ""
+
+#: includes/class-czl-settings.php:54
+msgid "Enable this shipping method"
+msgstr ""
+
+#: includes/class-czl-settings.php:58
+msgid "API Key"
+msgstr ""
+
+#: includes/class-czl-settings.php:60
+msgid "Enter your CZL Express API key"
+msgstr ""
+
+#: includes/class-czl-settings.php:64
+msgid "API Secret"
+msgstr ""
+
+#: includes/class-czl-settings.php:66
+msgid "Enter your CZL Express API secret"
+msgstr ""
+
+#: includes/class-czl-settings.php:70
+msgid "Test Mode"
+msgstr ""
+
+#: includes/class-czl-settings.php:72
+msgid "Enable test mode"
+msgstr ""
+
+#: includes/class-czl-settings.php:76
+msgid "Debug Log"
+msgstr ""
+
+#: includes/class-czl-settings.php:78
+msgid "Enable logging"
+msgstr ""
\ No newline at end of file
diff --git a/languages/woo-czl-express-zh_CN.po b/languages/woo-czl-express-zh_CN.po
deleted file mode 100644
index 34a3fb7..0000000
--- a/languages/woo-czl-express-zh_CN.po
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright (C) 2024 CZL Express
-# This file is distributed under the GPL v2 or later.
-msgid ""
-msgstr ""
-"Project-Id-Version: CZL Express for WooCommerce 1.0.0\n"
-"Report-Msgid-Bugs-To: https://exp.czl.net\n"
-"POT-Creation-Date: 2024-01-01 00:00:00+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2024-01-01 00:00:00+00:00\n"
-"Last-Translator: CZL Express\n"
-"Language-Team: CZL Express\n"
-"Language: zh_CN\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: woocommerce-czlexpress.php:89
-msgid "CZL Express requires WooCommerce to be installed and active"
-msgstr "CZL Express 需要安装并激活 WooCommerce"
-
-#: woocommerce-czlexpress.php:98
-msgid "CZL Express requires WooCommerce 6.0.0 or higher"
-msgstr "CZL Express 需要 WooCommerce 6.0.0 或更高版本"
-
-#: woocommerce-czlexpress.php:142
-msgctxt "Order status"
-msgid "In Transit"
-msgstr "运输中"
-
-#: woocommerce-czlexpress.php:187
-msgid "Creating shipment..."
-msgstr "正在创建运单..."
-
-#: woocommerce-czlexpress.php:188
-msgid "Shipment created successfully"
-msgstr "运单创建成功"
-
-#: woocommerce-czlexpress.php:189
-msgid "Failed to create shipment"
-msgstr "运单创建失败"
-
-#: woocommerce-czlexpress.php:199
-msgid "Permission denied"
-msgstr "权限不足"
-
-#: woocommerce-czlexpress.php:203
-msgid "Invalid order ID"
-msgstr "无效的订单ID"
-
-#: woocommerce-czlexpress.php:247
-msgid "Invalid parameters"
-msgstr "无效的参数"
-
-#: woocommerce-czlexpress.php:255
-msgid "Database update failed"
-msgstr "数据库更新失败"
-
-#: woocommerce-czlexpress.php:268
-msgid "Tracking number updated to: %s"
-msgstr "跟踪单号已更新为:%s"
-
-#: woocommerce-czlexpress.php:289
-msgid "Insufficient permissions"
-msgstr "权限不足"
-
-#: woocommerce-czlexpress.php:293
-msgid "Invalid order ID"
-msgstr "无效的订单ID"
-
-#: woocommerce-czlexpress.php:297
-msgid "Update scheduled"
-msgstr "更新已计划"
-
-#: woocommerce-czlexpress.php:341
-msgid "Every 30 minutes"
-msgstr "每30分钟"
\ No newline at end of file
diff --git a/languages/woo-czl-express.pot b/languages/woo-czl-express.pot
deleted file mode 100644
index 0150077..0000000
--- a/languages/woo-czl-express.pot
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright (C) 2024 CZL Express
-# This file is distributed under the GPL v2 or later.
-msgid ""
-msgstr ""
-"Project-Id-Version: CZL Express for WooCommerce 1.0.0\n"
-"Report-Msgid-Bugs-To: https://exp.czl.net\n"
-"POT-Creation-Date: 2024-01-01 00:00:00+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2024-MO-DA HO:MI+ZONE\n"
-"Last-Translator: CZL Express\n"
-"Language-Team: CZL Express\n"
-
-#: woocommerce-czlexpress.php:89
-msgid "CZL Express requires WooCommerce to be installed and active"
-msgstr ""
-
-#: woocommerce-czlexpress.php:98
-msgid "CZL Express requires WooCommerce 6.0.0 or higher"
-msgstr ""
-
-#: woocommerce-czlexpress.php:142
-msgctxt "Order status"
-msgid "In Transit"
-msgstr ""
-
-#: woocommerce-czlexpress.php:187
-msgid "Creating shipment..."
-msgstr ""
-
-#: woocommerce-czlexpress.php:188
-msgid "Shipment created successfully"
-msgstr ""
-
-#: woocommerce-czlexpress.php:189
-msgid "Failed to create shipment"
-msgstr ""
-
-#: woocommerce-czlexpress.php:199
-msgid "Permission denied"
-msgstr ""
-
-#: woocommerce-czlexpress.php:203
-msgid "Invalid order ID"
-msgstr ""
-
-#: woocommerce-czlexpress.php:247
-msgid "Invalid parameters"
-msgstr ""
-
-#: woocommerce-czlexpress.php:255
-msgid "Database update failed"
-msgstr ""
-
-#: woocommerce-czlexpress.php:268
-msgid "Tracking number updated to: %s"
-msgstr ""
-
-#: woocommerce-czlexpress.php:289
-msgid "Insufficient permissions"
-msgstr ""
-
-#: woocommerce-czlexpress.php:293
-msgid "Invalid order ID"
-msgstr ""
-
-#: woocommerce-czlexpress.php:297
-msgid "Update scheduled"
-msgstr ""
-
-#: woocommerce-czlexpress.php:341
-msgid "Every 30 minutes"
-msgstr ""
\ No newline at end of file
diff --git a/readme.md b/readme.md
index 10f52d7..ad3ac10 100644
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,6 @@
-# woocommerce-czlexpress
+# CZL Express for WooCommerce
+
+CZL Express shipping integration for WooCommerce. Provides real-time shipping rates, shipment creation, and package tracking.
## 描述
diff --git a/readme.txt b/readme.txt
index 52a61fd..b8b0f5e 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,128 +1,62 @@
=== CZL Express for WooCommerce ===
Contributors: czlexpress
-Tags: woocommerce, shipping, czl express, tracking, delivery, shipping method, china shipping, international shipping
+Tags: woocommerce, shipping, tracking, czl express, delivery
Requires at least: 5.8
-Tested up to: 6.4.2
-Requires PHP: 7.2
+Tested up to: 6.7
+Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
-License URI: https://www.gnu.org/licenses/gpl-2.0.html
-
-Integrate CZL Express shipping service with your WooCommerce store. Get real-time shipping rates, create shipments, and track packages.
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+
+CZL Express shipping integration for WooCommerce. Provides real-time shipping rates, shipment creation, and package tracking.
== Description ==
-CZL Express for WooCommerce provides seamless integration between your WooCommerce store and CZL Express shipping service. This plugin helps you automate your shipping process and provide better service to your customers.
+CZL Express for WooCommerce integrates CZL Express delivery services with your WooCommerce store. This plugin enables automatic shipping rate calculations, easy shipment creation, and real-time package tracking.
+
+Features:
-= Key Features =
* Real-time shipping rates calculation
* Automatic shipment creation
* Package tracking integration
-* Custom product grouping for shipping rates
-* Support for multiple currencies (CNY to other currencies)
-* Automatic order status updates
-* Customer-facing tracking information
-* Full HPOS (High-Performance Order Storage) support
-* WooCommerce remote logging support
-* Multi-language support
-
-= Advanced Features =
-* Custom product grouping for different shipping methods
-* Flexible pricing rules with markup support (e.g., "10% + 10")
-* Quick order creation in CZL Express system
-* Label printing support
-* Automatic tracking number synchronization (every 30 minutes)
-* Automatic tracking information updates (hourly)
-* Customer-visible shipping updates
-
-= Requirements =
-* WordPress 6.0 or higher
-* WooCommerce 6.0.0 or higher
-* PHP 7.4 or higher
-* MySQL 5.6 or higher
-* CZL Express account and API credentials
+* Order status synchronization
+* Bulk shipment processing
+* Customizable shipping options
== Installation ==
-1. Upload the plugin files to the `/wp-content/plugins/woocommerce-czlexpress` directory, or install the plugin through the WordPress plugins screen directly.
-2. Activate the plugin through the 'Plugins' screen in WordPress.
-3. Go to the plugin's settings page and configure your CZL Express API credentials and exchange rate.
-4. In WooCommerce > Settings > Shipping, configure your shipping zones:
- * Create a new zone
- * Select the desired regions
- * Add "CZL Express" as a shipping method
- * Configure the shipping method settings
-5. Go to "CZL Express" > "Product Groups" to set up your product groups:
- * Remove default groups if needed
- * Add custom groups (e.g., "SF Line", "SF Small Packet")
-6. The shipping rates will automatically calculate when customers enter their address.
+1. Upload the plugin files to the `/wp-content/plugins/czlexpress-for-woocommerce` directory, or install the plugin through the WordPress plugins screen directly.
+2. Activate the plugin through the 'Plugins' screen in WordPress
+3. Use the WooCommerce->Settings->Shipping->CZL Express screen to configure the plugin
+4. Enter your CZL Express API credentials in the settings
== Frequently Asked Questions ==
= Do I need a CZL Express account? =
-Yes, you need a CZL Express account and API credentials to use this plugin. Visit [https://exp.czl.net](https://exp.czl.net) to create an account.
+Yes, you need a CZL Express account and API credentials to use this plugin.
= How do I get API credentials? =
-Contact CZL Express support to obtain your API credentials.
+Contact CZL Express customer service to obtain your API credentials.
-= Can I test the plugin before going live? =
+= Is this plugin compatible with the latest WooCommerce version? =
-Yes, the plugin includes a test mode that allows you to test the integration without creating real shipments.
-
-= How are shipping rates calculated? =
-
-Shipping rates are calculated in real-time based on:
-* Package weight and dimensions
-* Destination address
-* Selected shipping method
-* Product grouping settings
-
-= Can I add a markup to shipping rates? =
-
-Yes, you can add both percentage and fixed amount markups. For example:
-* "10%" - Add 10% to the base rate
-* "+ 10" - Add 10 to the base rate
-* "10% + 10" - Add 10% plus 10 to the base rate
-
-= How often is tracking information updated? =
-
-* Tracking numbers are synced every 30 minutes
-* Tracking details are updated hourly
-* Manual updates are also available
-
-= Does it support multiple currencies? =
-
-Yes, rates are fetched in CNY and automatically converted to your store's currency using the configured exchange rate.
+Yes, this plugin is regularly tested and updated to maintain compatibility with the latest WooCommerce version.
== Screenshots ==
-1. Plugin settings page - Configure API credentials and general settings
-2. Shipping method configuration - Set up shipping zones and methods
-3. Product group management - Create and manage product groups
-4. Order with tracking information - View tracking details in orders
-5. Shipping rate display - How customers see shipping options
-6. Order management - Create shipments and print labels
-7. Tracking information - Customer-facing tracking updates
+1. Plugin settings page
+2. Shipping rate configuration
+3. Order management interface
+4. Tracking information display
== Changelog ==
= 1.0.0 =
* Initial release
-* Full WooCommerce HPOS support
-* Real-time shipping rates
-* Automatic shipment creation
-* Package tracking integration
-* Product grouping support
-* Multi-currency support
-* Automatic tracking updates
== Upgrade Notice ==
= 1.0.0 =
-Initial release of CZL Express for WooCommerce.
-
-== Support ==
-
-For support, please visit [https://exp.czl.net](https://exp.czl.net) or contact our support team.
\ No newline at end of file
+Initial release of CZL Express for WooCommerce plugin.
\ No newline at end of file
diff --git a/templates/shipping-method-group.php b/templates/shipping-method-group.php
index 5135f19..5f9ebfb 100644
--- a/templates/shipping-method-group.php
+++ b/templates/shipping-method-group.php
@@ -8,14 +8,14 @@ defined('ABSPATH') || exit;
id, $chosen_method); ?> />
-
+
label); ?>
has_sub_methods)): ?>
@@ -24,8 +24,13 @@ defined('ABSPATH') || exit;
remote_fee > 0): ?>
- remote_fee)); ?>
+ remote_fee))
+ );
+ ?>
@@ -34,9 +39,9 @@ defined('ABSPATH') || exit;
-
-
-
+
+
+
@@ -44,7 +49,7 @@ defined('ABSPATH') || exit;
-
+
@@ -52,5 +57,5 @@ defined('ABSPATH') || exit;
- cost); ?>
+ cost)); ?>
\ No newline at end of file
diff --git a/woocommerce-czlexpress.zip b/woocommerce-czlexpress.zip
deleted file mode 100644
index 53b6cd8..0000000
Binary files a/woocommerce-czlexpress.zip and /dev/null differ