-
-
Notifications
You must be signed in to change notification settings - Fork 71
Description
I wanted to use the plugin on an Arabic website -Arabic is an RTL language- and all worked well, but when I tried to download a customer invoice, I got this error "Your server's PHP and WordPress memory limits are too low to perform this check. You might need to contact your host provider and ask the PHP memory limit in particular to be raised." which did not make any sense because the memory limit was 512MB and when I switch the website back to english, the invoice is downloadable without any issues.
After digging deeper, I found that the plugin misses a font TTF file in this path wp-content/plugins/wp-multisite-waas/dependencies/mpdf/mpdf/ttfonts
The font is called XB_Riyaz.ttf. I used the Amiri font -as it should work with Arabic without any problem- and made some changes to this file "using AI"
class-invoice.php in this path wp-multisite-waas\inc\invoices, and now I can download the invoice on an Arabic website, but the Arabic words have spaces between letters.
The words should be like this فاتورة, but in the PDF it is ف ا ت و ر ة
I will attach the PDF invoice and the new adjusted code.
One last thing, I get this PHP warning related to the translation, it is something like the translation is loaded too early
[01-May-2025 07:41:20 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>wp-ultimo</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121