Người dùng này không có chủ đề yêu thích nào.
Chủ đề diễn đàn yêu thích
Chủ đề diễn đàn đã tạo
| Trạng thái |
Chủ đề
|
Người hỗ trợ | Ý kiến | Bài viết | Mới nhất |
|---|---|---|---|---|---|
|
WooCommerce + WPML Performance Issue — Very Slow Product Backend Loading
Được bắt đầu bởi: mariuszG-8 trong: English Support |
|
1 | 12 | 1 week, 4 days trước | |
|
Problem Description (English)
Được bắt đầu bởi: mariuszG-8
trong: English Support
Problem: Solution: meta_box_cb => 'post_categories_meta_box' in your custom code. This meta box forces WordPress to render the classic Categories-style checklist metabox for this taxonomy, which relies on wp_terms_checklist() → get_terms(), and WPML filters get_terms() in wp-admin to the current admin language. If your Fitment terms are created only in the default language and don’t have term translations, the checklist in the secondary language can appear empty. To resolve this: meta_box_cb => 'post_categories_meta_box' from your custom code to test if the terms show in the translation without it. If these steps do not resolve the issue, or if the solution becomes outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket. |
|
0 | 5 | 4 weeks, 1 day trước | |
|
WPML and Baselinker – Stock Update Not Syncing with Translated Products
Được bắt đầu bởi: mariuszG-8
trong: English Support
Problem: wpml_sync_custom_field hook, detailed here: wpml_sync_custom_field. function my_trbl_sync_stock() {
global $sitepress;
$results = get_original_products_and_variations();
foreach ( $results as $product ) {
if ( get_post_meta( $product->ID, '_manage_stock', true ) === 'yes' ) {
$translations = $sitepress->get_element_translations( $product->trid, $product->element_type );
$min_stock = false;
$stock_status = 'instock';
// collect min stock.
foreach ( $translations as $translation ) {
$stock = get_post_meta( $translation->element_id, '_stock', true );
if ( ! $min_stock || $stock < $min_stock ) {
$min_stock = $stock;
$stock_status = get_post_meta( $translation->element_id, '_stock_status', true );
}
}
// update stock value.
foreach ( $translations as $translation ) {
update_post_meta( $translation->element_id, '_stock', $min_stock );
update_post_meta( $translation->element_id, '_stock_status', $stock_status );
}
}
}
return true;
}
function get_original_products_and_variations() {
global $wpdb;
$results = $wpdb->get_results(
"
SELECT p.ID, t.trid, t.element_type
FROM {$wpdb->posts} p
JOIN {$wpdb->prefix}icl_translations t ON t.element_id = p.ID AND t.element_type IN ('post_product', 'post_product_variation')
WHERE p.post_type in ('product', 'product_variation') AND t.source_language_code IS NULL
"
);
return $results;
}You can then call my_trbl_sync_stock() after your programmatic update. Please note that this is a conceptual example and not officially supported or tested. Always back up your site before implementing custom code. If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket at WPML support forum. |
|
0 | 5 | 7 months, 1 week trước | |
|
Imprort products from baselinker (multicategory in both languages)
Được bắt đầu bởi: mariuszG-8 trong: English Support |
|
0 | 2 | 10 months trước | |
|
Automatic transfer of multilingual product data from Baselinker to WooCommerce
Được bắt đầu bởi: mariuszG-8 trong: English Support |
|
0 | 2 | 11 months, 1 week trước |