فتح التشخيص...

ستتم إعادة توجيهك إلى تشخيص الجلد لمدة دقيقتين. إذا لم يحدث شيء، انقر أدناه.

بدء التشخيص →

// server-side which the PHP gettext filter doesn't reach (different template // call). DOM-swap belt-and-suspenders fix. function fixCheckoutLabels() { var isAR = document.body.classList.contains('translatepress-ar'); // FR / EN → "إتمام الشراء" (FR side). // AR side: WoodMart's "إتمام الشراء" was machine-translated to // "إتمام الشراء" (literally "Sign out / Log out") — wrong context. // Force the correct AR commerce verb: "إتمام الشراء" (complete the purchase). var swaps = isAR ? { 'إتمام الشراء': 'إتمام الشراء', 'إتمام الشراء': 'إتمام الشراء', 'Procéder au paiement': 'إتمام الشراء', "إتمام الشراء": 'إتمام الشراء', "إتمام الشراء": 'إتمام الشراء', 'Proceed to checkout': 'إتمام الشراء', 'Proceed to Checkout': 'إتمام الشراء' } : { 'إتمام الشراء': "إتمام الشراء", 'Procéder au paiement': "إتمام الشراء", 'Proceed to checkout': "إتمام الشراء", 'Proceed to Checkout': "إتمام الشراء" }; document.querySelectorAll('span, a, button').forEach(function (el) { // Only act on leaf-ish nodes (avoid nested replacements) if (el.children.length > 0 && el.firstElementChild.tagName !== 'I') return; var t = (el.textContent || '').trim(); if (swaps[t]) el.textContent = swaps[t]; }); } fixCheckoutLabels(); window.addEventListener('load', fixCheckoutLabels); document.addEventListener('updated_cart_totals', fixCheckoutLabels); document.addEventListener('updated_wc_div', fixCheckoutLabels); setTimeout(fixCheckoutLabels, 500); setTimeout(fixCheckoutLabels, 1500); setTimeout(fixCheckoutLabels, 3000); // Round 10.8c — TP renders AR text AFTER initial load + setTimeout passes, // so the AR "إتمام الشراء" can land in DOM after our swap fired. Use a // MutationObserver on the cart page that re-fires the swap on any DOM change. if (/\/cart\/|\/checkout\//.test(location.pathname)) { var mo = new MutationObserver(function () { fixCheckoutLabels(); }); mo.observe(document.body, { childList: true, subtree: true, characterData: true }); setTimeout(function () { mo.disconnect(); }, 8000); } })();