davvalent commited on 2022-08-17 05:20:57
Showing 1 changed files, with 2 additions and 1 deletions.
| ... | ... |
@@ -844,7 +844,8 @@ if ( ! class_exists( 'SP_REST_API' ) ) : |
| 844 | 844 |
* @return mixed |
| 845 | 845 |
*/ |
| 846 | 846 |
public static function get_post_data( $object, $field_name, $request ) {
|
| 847 |
- $type = $object['type']; |
|
| 847 |
+ //$type = $object['type']; |
|
| 848 |
+ $type = get_post_type( $object['id'] ); |
|
| 848 | 849 |
|
| 849 | 850 |
$post = new $type( $object['id'] ); |
| 850 | 851 |
|
| 851 | 852 |