tabs = apply_filters( 'tiered_pricing_table/global_pricing/form_tabs', $tabs, $this ); } ); add_action( 'edit_form_after_title', function ( WP_Post $post ) { if ( GlobalTieredPricingCPT::SLUG !== $post->post_type ) { return; } $this->render( $post ); } ); new UpgradeTip(); } protected function includeAssets() { ?> includeAssets(); $rulesCount = (int) wp_count_posts( GlobalTieredPricingCPT::SLUG )->publish; if ( $this->isNewRule() && $rulesCount < 1 ) { $this->renderHelpingSteps(); } if ( ! $this->isNewRule() && ! $this->getPricingRuleInstance( $post )->isValidPricing() ) { $this->tabs[0]->renderHint( __( 'The pricing rule does not affect either prices or product quantity limits. The rule will be skipped.', 'tier-pricing-table' ), array( 'custom_class' => 'tpt-global-pricing-rule-hint--top-level' ) ); } ?>
tabs as $tab ) : ?>
render( $this->getPricingRuleInstance( $post ) ); do_action( 'tiered_pricing_table/global_pricing/form/tab_end', $tab, $this->getPricingRuleInstance( $post ) ); ?>
pricingRuleInstance ) ) { $this->pricingRuleInstance = GlobalPricingRule::build( $post->ID ); } return $this->pricingRuleInstance; } public function renderHelpingSteps() { ?> __( 'Set Custom Pricing', 'tier-pricing-table' ), 'description' => __( 'Set custom regular and tiered pricing for matching products.', 'tier-pricing-table' ), 'icon' => '$', ), array( 'title' => __( 'Select Products', 'tier-pricing-table' ), 'description' => __( 'Target specific products, categories, tags, or brands. Leave empty to apply store-wide.', 'tier-pricing-table' ), 'icon' => '', ), array( 'title' => __( 'Filter Users', 'tier-pricing-table' ), 'description' => 'Restrict this pricing to specific customers or user roles.', 'icon' => '', ), array( 'title' => __( 'Quantity Limits', 'tier-pricing-table' ), 'description' => __( 'Enforce minimum, maximum, and step increments for purchasing.', 'tier-pricing-table' ), 'icon' => '', ), ) ?>
×

%s %s', esc_html__( 'Note:', 'tier-pricing-table' ), esc_html__( 'Depending on your priority settings, global rules may override product-level pricing configurations.', 'tier-pricing-table' ) ); ?>

$step ) : ?>