delete_connection( (string) $conn['connection_id'] ) : ( ! empty( $conn['webhook_id'] ) ? $api->delete_webhook( (string) $conn['connection_id'], (string) $conn['webhook_id'] ) : true ); if ( is_wp_error( $r ) ) { // Bei der Deinstallation gibt es keine Oberfläche für einen Hinweis. error_log( 'Mapasso: Abmelden bei der Deinstallation fehlgeschlagen: ' . $r->get_error_message() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log } } if ( function_exists( 'as_unschedule_all_actions' ) ) { as_unschedule_all_actions( '', array(), 'mapasso-dpp' ); } delete_option( Mapasso_DPP_Store::SETTINGS ); delete_option( Mapasso_DPP_Store::CONNECTION ); delete_option( Mapasso_DPP_Store::PENDING ); delete_post_meta_by_key( Mapasso_DPP_Store::META_PASS ); delete_post_meta_by_key( Mapasso_DPP_Store::META_HASH ); delete_post_meta_by_key( Mapasso_DPP_Store::META_EXTERNAL ); // Zwischengespeicherte QR-Codes, Hinweise, Verbinden-Merker und Zustellungen (W-N6) // phpcs:ignore WordPress.DB.DirectDatabaseQuery $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_mapasso_dpp_' ) . '%', $wpdb->esc_like( '_transient_timeout_mapasso_dpp_' ) . '%' ) ); } if ( is_multisite() ) { foreach ( get_sites( array( 'fields' => 'ids' ) ) as $mapasso_dpp_site ) { switch_to_blog( $mapasso_dpp_site ); mapasso_dpp_uninstall_site(); restore_current_blog(); } } else { mapasso_dpp_uninstall_site(); }