• MrAddy

    (@mraddy)


    Hi, on the request-a-quote class, line 553, I need to change the text that is printed on the screen. You have an apply_filter for it.

    Because I want to change the text, how best do I do that, as it’s not a template I cannot just put it in the themes folder.

    I query this because the filter is only applied on a True or False logic.

    So for example, if i wanted to change “Product added!” to “Product has been added” how would I do this ?

Viewing 1 replies (of 1 total)
  • Thread Starter MrAddy

    (@mraddy)

    I really do need some assistance with this.

    I am adding add-to-quote.php to the themes folder (woocommerce), as suggested in your website (https://yithemes.com/docs-plugins/yith-woocommerce-request-a-quote/07-codex.html) site docs, and the changes are not being seen.

    I need to change the text on line 553 of class.tith-request-quote.php

    if ( $return == 'true' ) {
                    $message = apply_filters( 'yith_ywraq_product_added_to_list_message', __( 'Product added!', 'yith-woocommerce-request-a-quote' ) );
                }
                elseif ( $return == 'exists' ) {
                    $message = apply_filters( 'yith_ywraq_product_already_in_list_message', __( 'Product already in the list.', 'yith-woocommerce-request-a-quote' ) );
                }

    I tried adding the function, and filter to the theme function.php, but again with no prevail:

    apply_filters( ‘yith_ywraq_product_added_to_list_message’, __( ‘Enquiry has been added’, ‘yith-woocommerce-request-a-quote’ ) );

    I tried to add a new filter, to catch this applied filter, and still no change.

    How do I customise the plugin, without the changes being effected on any update ?

Viewing 1 replies (of 1 total)
  • The topic ‘Change Text’ is closed to new replies.