Home Forums ACF PRO Return Value File Array


Return Value File Array

  • Hi to all, I have created an upload file field in a taxonomy in woocommerce, and I set File Array in Return Value.
    Now I need to have for uploaded files the array with the server path, what should I do?

  • Hi @funkman733

    Thanks for the question.

    You can load values from a media attachment by passing a second parameter containng the $attachment->ID

    You could make use of the get_field() function as follows:

    $file = get_field('field_name', $attachment->ID);
    echo $file['url'];
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Return Value File Array’ is closed to new replies.