• When enabling the “Show in stock” filter, I noticed I cannot translate the label Stock anywhere.

    Looking in the code, this label is just returned as a raw value:

    /**
     * Get Label
     *
     * @return string
     */
    public function getLabel() {
        return 'Stock';
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Robert Fortaleza

    (@robfrtlz)

    Hi @lucas81,

    Good day! Thanks for writing in.

    Our plugin is translation ready, meaning you can translate it through editing the .PO file or through using a string translation plugin like the LocoTranslate.

    Thread Starter lucas81

    (@lucas81)

    We use WPML. I cannot find the text Stock in either the string translation nor the .PO file.

    If you look in the code the label is hardcoded. When changed line 79 to the following the translations work fine:

    return __(‘Stock’, ‘premmerce-filter’);

    \Filter\Filter\Items\Types\InStockFilter.php

    Perhaps you can consider implementing this in a future release?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The Stock label is not translatable’ is closed to new replies.