• Resolved CotswoldPhoto

    (@cotswoldphoto)


    So, I didn’t actually want to change, for example, the ‘Add to Cart’ text on my product page Add to Cart button. Instead I wanted to add a fontawesome shpooing cart. For now, on the customizer plugin Product Page tab I have this for the Add to Cart Button Text … All Product Types:

    <i class="fa fa-shopping-cart fa-flip-horizontal fa-lg"></i> Add to Cart

    But this then overrides all language settings. Instead I would prefer to call the woocommerce language variable that outputs ‘Add to Cart’ in English, but whatever for French etc.

    Is this possible? I tried putting php call the function as I think it is:

    add_to_cart_text()

    but the customizer plugin code obviously strips this, as well as trying a code snippet (using the PHP Code Snippets plugin), but that also would not work.

    Maybe instead of simply replacing text, the plugin could optionally prepend/replace/append?

    https://ww.wp.xz.cn/plugins/woocommerce-customizer/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter CotswoldPhoto

    (@cotswoldphoto)

    Whoops, sorry about the typos. I took a quick look at the plugin php. It ought to be possible to change each option setting to have 3 text input boxes (and thus 3 possible settings). One for prepend, one for replace, and one for append. If blank, no processing needed. I might take a look at this later.

    Plugin Author Max Rice

    (@maxrice)

    Hey there,

    Sounds like a cool idea and definitely something that’s possible to do with custom code using the filters that WooCommerce providers. The customizer is designed to do really simple replacements vs. more complex stuff. I’d recommend writing a custom plugin if you need to do anything beyond what the Customizer already provides 🙂

    Max

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Retaining Multilingual Support’ is closed to new replies.