| @@ -42,8 +42,13 @@ | ||
| 42 | 42 | if ( is_array( $existing_raw ) && ! empty( $existing_raw ) ) { |
| 43 | 43 | $raw = array_merge( $existing_raw, $raw ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + // If not a video tour, remove any stale video ID from existing data | |
| 47 | + if ( ( $raw['tour-type'] ?? '' ) !== 'video' ) { | |
| 48 | + unset( $raw['vidid'] ); | |
| 49 | + } | |
| 50 | + | |
| 46 | 51 | // If the request carries proData (future React pro panels will send this), |
| 47 | 52 | // run the same filter the legacy AJAX stack uses so pro plugin saves its fields. |
| 48 | 53 | if ( $this->is_pro && ! empty( $api_data['proData'] ) && is_array( $api_data['proData'] ) ) { |
| 49 | 54 | // Snapshot floor plan keys before the pro filter runs. |