PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
← All changes | src/Services/ProductPageService.php +3 -3 7.1.1 → 8.0.2 View file →
@@ -2,8 +2,9 @@
2 2
3 3 use Exception;
4 4 use TierPricingTable\Admin\ProductPage\TieredPricingTab;
5 5 use TierPricingTable\Core\ServiceContainerTrait;
6 +use TierPricingTable\Settings\Sections\GeneralSection\GeneralSection;
6 7 use TierPricingTable\PriceManager;
7 8 use TierPricingTable\PricingTable;
8 9 use TierPricingTable\Settings\Sections\GeneralSection\Subsections\ProductPagePriceSubsection;
9 10 use TierPricingTable\TierPricingTablePlugin;
@@ -39,10 +40,9 @@
39 40 // Wrap price
40 41 add_action( 'woocommerce_get_price_html', array( $this, 'wrapPrice' ), 101, 2 );
41 42
42 43 // Render price table
43 - add_action( $this->getContainer()->getSettings()->get( 'position_hook',
44 - 'woocommerce_before_add_to_cart_button' ), array(
44 + add_action( GeneralSection::getPositionHook(), array(
45 45 $this,
46 46 'renderPricingTableOnProductPage',
47 47 ), - 999 );
48 48
@@ -241,9 +241,9 @@
241 241 */
242 242 public function renderTooltip( ?string $price, WC_Product $_product ): ?string {
243 243
244 244 // Do not render if not display
245 - if ( 'yes' !== $this->getContainer()->getSettings()->get( 'display', 'yes' ) ) {
245 + if ( ! GeneralSection::isAutomaticDisplayEnabled() ) {
246 246 return $price;
247 247 }
248 248
249 249 $displayType = TieredPricingTab::getProductTemplate( $_product->get_parent_id() ? $_product->get_parent_id() : $_product->get_id() );