airesvsg / acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API
https://wordpress.org/plugins/acf-to-rest-api/
1.33k stars 111 forks source link

acf/rest_api/item_permissions/get - not working #342

Closed sgtpepperaut closed 4 years ago

sgtpepperaut commented 4 years ago

hi im adding the filter as per manual but the filter is never called! request works and returns acf fields but it appears i can not make the default "unahtorized". why?

    add_filter( 'acf/rest_api/item_permissions/post', function ( $permission) {
        error_log( print_r( 'perm fitler called', 1 ), 0 );
        return false;

    } );

log shows that permission filter is never called. other filters such as acf/rest_api/field_settings/show_in_rest work!

do i need to load this filter in a special way or order?

sgtpepperaut commented 4 years ago

ok .... looked trough code: acf/rest_api/itemS_permissions/get is NOT acf/rest_api/item_permissions/get

all good now.