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). register_activation_hook( __FILE__, function () { if ( $permalinks = get_option( ‘woocommerce_permalinks’ ) ) { $permalinks[‘product_base’] = ‘property’; update_option( ‘woocommerce_permalinks’, $permalinks ); flush_rewrite_rules(); } … Read more