• Hello,

    I have set a custom field use true/false, name is sidebar, the default value is true.

    Its show at all of the page, but when i try to check is it get the field, it return false at all of the woocommerce page. (its work at normal page)

    I use this code to check the value.

    if( get_field(‘sidebar’) ) {
    echo “true”;
    }
    else {
    echo “false”;
    }

    Please let me know if i doing some step wrong, thank you very much.

    https://www.ads-software.com/plugins/advanced-custom-fields/

  • The topic ‘How can woocommerce get the custom field?’ is closed to new replies.