diff --git a/includes/admin/class-yoone-product-bundles-admin.php b/includes/admin/class-yoone-product-bundles-admin.php
index 8ba9389..ae7fd8a 100644
--- a/includes/admin/class-yoone-product-bundles-admin.php
+++ b/includes/admin/class-yoone-product-bundles-admin.php
@@ -1,6 +1,6 @@
__('混装产品', 'yoone-product-bundles'),
+ 'label' => __('Mix and Match', 'yoone-product-bundles'),
'target' => 'yoone_bundle_data',
- 'class' => array('show_if_yoone_bundle'), // 仅当类型为 yoone_bundle 时显示
+ 'class' => array('show_if_yoone_bundle'), // Only show for 'yoone_bundle' type
'priority' => 70,
);
return $tabs;
@@ -48,13 +48,13 @@ class Yoone_Product_Bundles_Admin {
wp_nonce_field('yoone-bundle-admin-nonce', 'yoone_bundle_admin_nonce_field');
echo '
';
- echo '
' . esc_html__('配置可混装的简单商品、最小混装数量以及前端展示的分类分组。', 'yoone-product-bundles') . '
';
+ echo '
' . esc_html__('Configure the simple products that can be included in the bundle, the minimum quantity, and the category grouping for the frontend display.', 'yoone-product-bundles') . '
';
- // 可混装商品:使用 Woo 的产品搜索(select2),multiple
- echo '
' . esc_html__('可混装商品', 'yoone-product-bundles') . ' ';
- echo '' . esc_html__('一键添加所有 Simple Product', 'yoone-product-bundles') . ' ';
- // 仅搜索产品,不含变体,避免误选导致前端不显示
- echo '';
+ // Allowed products: use Woo's product search (select2), multiple
+ echo '' . esc_html__('Allowed Products', 'yoone-product-bundles') . ' ';
+ echo '' . esc_html__('Add All Simple Products', 'yoone-product-bundles') . ' ';
+ // Search only for products, not variations, to avoid errors
+ echo '';
if (! empty($allowed)) {
foreach ($allowed as $pid) {
$p = wc_get_product($pid);
@@ -64,30 +64,30 @@ class Yoone_Product_Bundles_Admin {
}
}
echo ' ';
- echo '' . esc_html__('仅支持 simple product;变体商品可在后续版本支持。', 'yoone-product-bundles') . ' ';
+ echo '' . esc_html__('Only simple products are supported. Variable products may be supported in a future version.', 'yoone-product-bundles') . ' ';
echo '
';
- // 最小混装数量
+ // Minimum bundle quantity
woocommerce_wp_text_input(array(
'id' => 'yoone_bundle_min_quantity',
- 'label' => __('最小混装数量', 'yoone-product-bundles'),
+ 'label' => __('Minimum Quantity', 'yoone-product-bundles'),
'type' => 'number',
'desc_tip' => true,
- 'description' => __('顾客选择的总数量需不小于该值,方可加入购物车。', 'yoone-product-bundles'),
+ 'description' => __('The total quantity of selected items must be greater than or equal to this value to add to the cart.', 'yoone-product-bundles'),
'value' => $min_qty,
'custom_attributes' => array('min' => '0'),
));
- // 展示分类(product_cat)
- echo '' . esc_html__('前端展示分类', 'yoone-product-bundles') . ' ';
- echo '';
+ // Display categories (product_cat)
+ echo '' . esc_html__('Display Categories', 'yoone-product-bundles') . ' ';
+ echo '';
$terms = get_terms(array('taxonomy' => 'product_cat', 'hide_empty' => false));
foreach ($terms as $t) {
$selected = in_array($t->term_id, $cats, true) ? 'selected' : '';
printf('%s ', $t->term_id, $selected, esc_html($t->name));
}
echo ' ';
- echo '' . esc_html__('用于在前端页面按分类分组展示可混装商品(仅展示与所选分类匹配的可混装商品)。', 'yoone-product-bundles') . ' ';
+ echo '' . esc_html__('Group the allowed products by category on the frontend. Only products matching the selected categories will be shown.', 'yoone-product-bundles') . ' ';
echo '
';
echo '
'; // options_group
diff --git a/includes/class-yoone-product-bundles.php b/includes/class-yoone-product-bundles.php
index 2784c74..e5f8771 100644
--- a/includes/class-yoone-product-bundles.php
+++ b/includes/class-yoone-product-bundles.php
@@ -1,13 +1,13 @@
const META_MIN_QTY = '_yoone_bundle_min_quantity'; // int
const META_CATEGORIES = '_yoone_bundle_categories'; // array