- fixed REST API endpoint List Pages

This commit is contained in:
yuriinalivaiko
2023-08-27 00:11:52 +03:00
parent 42bfa3fa61
commit 53a6ffc78d
+5
View File
@@ -1374,6 +1374,11 @@ function um_pre_profile_shortcode( $args ) {
return;
}
// disable for the REST API requests.
if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
return;
}
if ( true === UM()->fields()->editing ) {
if ( um_get_requested_user() ) {
if ( ! UM()->roles()->um_current_user_can( 'edit', um_get_requested_user() ) ) {