Woocommerce plugin - How to create two versions of the same plugin with slightly different implementation for different users

I am working on the development of a woocommerce plugin and this plugin is shipped to 2 different set of customers. I'd like to manage both of those versions in one git repository. But then ship to each customer their version (I send them a zipped folder of the plugin).

Issue: It is a hassle to maintain two versions on two separate git branches and there is no complier for example to apply certain changes based on which version of the plugin I am creating

Goal: I am trying to manage two different versions of a plugin in the same repository

Methods I've tried: Having the files the are different between both versions in separate folders and making an alias in the cmd that I use to copy the files intended for this version before zipping the folder

Topic git plugin-development plugins Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.