This question already has an answer here:
I'm am attempting to change the rewrite argument after it has been defined and passed as an argument for 'register_post_type' in a plugin. My issue is that I am utilizing a plugin that defines a custom post type. I can manually edit the rewrite argument in the plugin; however, doing so will mean that I have to do this every time the plugin updates. I was wondering if there is a way that I can change this with some code in another plugin or functions.php file.
I was thinking there might be a function that would allow me to alter these arguments or a way in which I could unregister and reregister the custom post type.