• Resolved juantellobop

    (@juantellobop)


    We have a relationship between an acf custom post type and woocommerce products.
    When we put the acf field on the filter, the dropdown shows the ID of the products instead of Names. Is there a way to force showing names?

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

    (@juantellobop)

    DONE. I’ll post the solution, is with PHP on functions.php

    add_filter( 'wpc_filter_post_meta_term_name', 'wpc_custom_term_name', 10, 2 );
    function wpc_custom_term_name( $term_name, $products_name ){
        if( $products_name === 'products' ){
            $term_name = get_the_title( $term_name );
        }
    
        return $term_name;
    }
    Plugin Support fesupportteam

    (@fesupportteam)

    Hi @juantellobop

    Thank you for your interest in the Filter Everything plugin.

    We are glad to hear that the issue was resolved. Thank you for sharing with your solution.

    Best Regards – Victor

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ACF Custom Field – Relationship. Instead of showing Name, is showing ID’ is closed to new replies.