1 vote
Accepted

Change product_base programmatically

Use your plugin activation hook to make the change. That will only run once, when your plugin is first activated, allowing the user to overwrite that change later (if they want to). ...
user avatar
  • 35.5k
1 vote

flush_rewrite_rules() not working with update_option_{$option}

flush_rewrite_rules() should be called very early within the Wordpress initialization. The reason is that the entpoints cannot be changed afterwards. A solution could look like this: function ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible