| @@ -42,9 +42,15 @@ | ||
| 42 | 42 | if ( ! User::is_current_user_can_edit( $object->ID ) ) { |
| 43 | 43 | return false; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - Plugin::$instance->db->set_is_elementor_page( $object->ID, false ); | |
| 46 | + $document = Plugin::$instance->documents->get( $object->ID ); | |
| 47 | + | |
| 48 | + if ( ! $document ) { | |
| 49 | + return false; | |
| 50 | + } | |
| 51 | + | |
| 52 | + $document->set_is_built_with_elementor( false ); | |
| 47 | 53 | |
| 48 | 54 | return true; |
| 49 | 55 | }, |
| 50 | 56 | ] |