Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #900345

    Good Day

    I would like to find out,
    I noticed that when one check out – they have duplicate in terms and conditions.

    I tried the following from the forum

    WooCommerce Terms shown twice

    and if you want to fix it with a more clean approach through a filter, you can use this piece of code in functions.php

    add_filter(‘woocommerce_format_content’, ‘yanco_remove_inline_terms’, 10, 2);
    function yanco_remove_inline_terms( $apply_filters, $raw_string ) {
    if( is_checkout() ) {
    return ”;
    }
    return $apply_filters;
    }

    it gives me error –
    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

    Please can Enfold team advice.

    My website is http://www.ecbuy.co.za

    #900846

    Any Enfold Support please ?

    #901721

    Hi,

    Your return needs to be converted as

    return “”;

    and it should work.

    Best regards,
    Basilis

    #902003

    Please advice where must i put the converted as ?

    add_filter(‘woocommerce_format_content’, ‘yanco_remove_inline_terms’, 10, 2);
    function yanco_remove_inline_terms( $apply_filters, $raw_string ) {
    if( is_checkout() ) {
    return ”;
    }
    return $apply_filters;
    }
    ;

    Like that above?

    #902079

    add_filter(‘woocommerce_format_content’, ‘yanco_remove_inline_terms’, 10, 2);
    function yanco_remove_inline_terms( $apply_filters, $raw_string ) {
    if( is_checkout() ) {
    return “”;
    }
    return $apply_filters;
    }

    Hi – i tried as stated
    But it gives me an error when updating

    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

    #902660

    Hi charlescheng719,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #902687
    This reply has been marked as private.
    #903173

    Hi charlescheng719,

    Yes, I see the error, but the error is not it the code, you need to try to add this code via FTP.

    Best regards,
    Victoria

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.