plugin rework, inspired by woocommerce