context = adp_context(); } public function withContext(Context $context) { $this->context = $context; } public function replaceWcProductFactory() { if ( did_action('woocommerce_init') ) { WC()->product_factory = new PricingProductFactory(); } } }