fix: validate allow new terms of create a auto-draft item
This commit is contained in:
parent
3db120a8c3
commit
efe518e474
|
@ -883,7 +883,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
return new \WP_REST_Response( [
|
||||
'error_message' => __( 'Please verify, invalid value(s)', 'tainacan' ),
|
||||
'errors' => $item_metadata->get_errors(),
|
||||
'item_metadata' => $this->prepare_item_for_response($item_metadata, $request),
|
||||
'item_metadata' => $this->prepare_item_for_response($item_metadata->get_item(), $request),
|
||||
], 400 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -293,8 +293,8 @@ class Taxonomy extends Metadata_Type {
|
|||
|
||||
$item = $item_metadata->get_item();
|
||||
|
||||
if ( !in_array($item->get_status(), apply_filters('tainacan-status-require-validation', ['publish','future','private'])) )
|
||||
return true;
|
||||
// if ( !in_array($item->get_status(), apply_filters('tainacan-status-require-validation', ['publish','future','private'])) )
|
||||
// return true;
|
||||
|
||||
$valid = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue