Duplicate shipping method logic to another shipping method [closed]

I see 2 options here:

  • Create a new plugin (copying the old one) and modify it as you need
  • With just one plugin, create multiple shipping methods. Remember that you can call the add_rate() method multiple times inside one shipping class.

As a shipping plugins developer, what I do is using the second option for each variant of a carrier. For example if we are using DHL, with one plugin and within the same class, you can add shipping options for DHL Express shipping and DHL Standard shipping. You don’t need multiple classes for this.