context = adp_context(); $this->customizer = $contextOrCustomizer instanceof CustomizerExtensions ? $contextOrCustomizer : $customizerOrEngine; $this->engine = $customizerOrEngine instanceof Engine ? $customizerOrEngine : $deprecated; } public function withContext(Context $context) { $this->context = $context; } /** * @param CustomizerExtensions $customizer */ public static function register($customizer, $engine) { $shortcode = new self($customizer, $engine); add_shortcode(self::NAME, array($shortcode, 'getContent')); } public function getContent($args) { /** @var RangeDiscountTable $table */ $rangeDiscountTable = Factory::get( "VolumePricingTable_RangeDiscountTable", $this->customizer, $this->engine ); return $rangeDiscountTable->getCategoryTableContent(); } }