'_a2w_external_id',
'value' => $external_id,
'label' => esc_html__('External Id', 'ali2woo'),
'desc_tip' => true,
'description' => esc_html__('External Aliexpress Product Id', 'ali2woo'),
]);
woocommerce_wp_text_input([
'id' => '_a2w_orders_count',
'value' => get_post_meta($post_id, '_a2w_orders_count', true),
'label' => esc_html__('Orders count', 'ali2woo'),
'desc_tip' => true,
'description' => esc_html__('Aliexpress orders count', 'ali2woo'),
'custom_attributes' => ['readonly'=>'readonly'],
]);
$disable_sync = get_post_meta($post_id, '_a2w_disable_sync', true);
woocommerce_wp_checkbox([
'id' => '_a2w_disable_sync',
'value' => $disable_sync ? 'yes' : 'no',
'label' => esc_html__('Disable synchronization?', 'ali2woo'),
'description' => esc_html__('Disable global synchronization for this product', 'ali2woo'),
]);
?>
'_a2w_disable_var_price_change',
'value' => get_post_meta($post_id, '_a2w_disable_var_price_change', true) ? 'yes' : 'no',
'label' => esc_html__('Disable price change?', 'ali2woo'),
'description' => esc_html__('Disable variations price change', 'ali2woo'),
));
woocommerce_wp_checkbox(array(
'id' => '_a2w_disable_var_quantity_change',
'value' => get_post_meta($post_id, '_a2w_disable_var_quantity_change', true) ? 'yes' : 'no',
'label' => esc_html__('Disable quantity change?', 'ali2woo'),
'description' => esc_html__('Disable variations quantity change', 'ali2woo'),
));
woocommerce_wp_checkbox(array(
'id' => '_a2w_disable_add_new_variants',
'value' => get_post_meta($post_id, '_a2w_disable_add_new_variants', true) ? 'yes' : 'no',
'label' => esc_html__('Disable add new variants?', 'ali2woo'),
'description' => esc_html__('Disable add new variants if they appear.', 'ali2woo'),
));
if ($disable_sync) {
?>
getCost();
$shipping_country_from = $ProductShippingData->getCountryFrom() ?: 'CN';
$shipping_country_to = $ProductShippingData->getCountryTo();
$shipping_method = $ProductShippingData->getMethod();
$shipping_info = "";
if ($shipping_country_to && $shipping_method) {
$shipping_info = $shipping_country_from.", ".$shipping_country_to.", ".$shipping_method.", ".($shipping_cost ? $shipping_cost : 'free');
$items = $ProductShippingData->getItems(1, $shipping_country_from, $shipping_country_to);
if ($items) {
foreach ($items as $item) {
if ($item['serviceName'] == $shipping_method) {
$shipping_info = $shipping_country_from.", ".$shipping_country_to.", ".$item['company'].", ".($shipping_cost ? ($item['freightAmount']['formatedAmount'] ?? $item['freightAmount']['value']) : 'free');
break;
}
}
}
}
?>
Select shipping / Reset