How to remove Astra Meta Options

Add this code to the theme cunstions.php file

add_action( 'admin_init', 'delete_postmeta_rows_for_astra_settings' );
function delete_postmeta_rows_for_astra_settings() {
    // To remove metabox (it will prevent you to update/add new data in postmeta in future)
    $instance = Astra_Meta_Boxes::get_instance();
    remove_action( 'load-post.php', array( $instance, 'init_metabox' ) );
    remove_action( 'load-post-new.php', array( $instance, 'init_metabox' ) );
}

Leave a Reply

%d bloggers like this: