I am attempting to troubleshoot a wide-scale downside.
I might prefer to rewrite default WooCommerce permalinks for classes, to delimiter as commas.
Let’s take an instance:
The permalink construction I might prefer to have:
- /chip-tuning-Ford
- /chip-tuning-Ford-Focus
- /chip-tuning-Ford-MK3-FL
- /chip-tuning-Ford-MK3-FL-1.5TDCi-75kW
- /chip-tuning-Ford-MK3-FL-1.5TDCi-75kW-Primary-Field
- /chip-tuning-Ford-MK3-FL-1.5TDCi-75kW
- /chip-tuning-Ford-MK3-FL
- /chip-tuning-Ford-Focus
I did this through generate_rewrite_rules motion, however at the moment, now we have about 4000 classes and 9000 merchandise, so every mixture takes a number of time and area. All rewrite guidelines by WP default are saved into one discipline on the DB, so it makes the web site very sluggish.
Additionally, I attempted dynamic guidelines, however it works fantastic for 1-3 ranges and if class names haven’t got an extra delimiter – changed by area.
The overall downside is how you can write a dynamic rewrite rule to match a sure class and product. The generator is already written, want a approach to save / retailer / deal with it.
FYI. Classes and merchandise are created through Relaxation API.
Thanks to your recommendation!