• Resolved madman_18

    (@madman_18)


    My website works with 3 different languages, is possible to change the post or message from the plugin to differents languages?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Pramschufer

    (@mattpramschufer)

    hey @madman_18 there is nothing in my plugin that will handle multiple languages out of the box, but there are several plugins that will allow you to translate multiple items and inject via a shortcode. You can also then look at the various filters at https://pramadillo.com/documentation/filters-for-woocommerce-pay-per-post/ for updating some headings programatically.

    Hope that gets you on the right track.

    Thread Starter madman_18

    (@madman_18)

    Thanks!
    I apply the filter like:

    add_filter('wc_pay_per_post_shortcode_purchased_no_posts', 'my_theme_wc_pay_per_post_shortcode_has_access_no_posts');
    function my_theme_wc_pay_per_post_shortcode_has_access_no_posts(){
        return 'That is my text';
    }

    But I enter into the protected-post and I can’t see any change the message is the usual:

    Oops, Restricted Content
    We are sorry but this post is restricted to folks that have purchased this page.

    Where applay the change the hook?

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    That hook is for changing text when the user does not have any purchased content.

    The filter you are looking for is

    wc_pay_for_post_override_paywall_content

            add_filter('wc_pay_for_post_override_paywall_content', function($content){
                return 'WHATEVER YOU WANT';
            });
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translate message’ is closed to new replies.