| @@ -38,9 +38,13 @@ | ||
| 38 | 38 | * |
| 39 | 39 | * @return string |
| 40 | 40 | */ |
| 41 | 41 | public function formatPrice( $priceHtml, $product ) { |
| 42 | - if ( ! is_product() ) { | |
| 42 | + | |
| 43 | + $formatCondition = $this->settings->get( 'tiered_price_at_product_page', | |
| 44 | + 'no' ) === 'yes' || get_queried_object_id() != $product->get_id(); | |
| 45 | + | |
| 46 | + if ( $formatCondition ) { | |
| 43 | 47 | $displayPriceType = $this->getDisplayType(); |
| 44 | 48 | |
| 45 | 49 | if ( in_array( $product->get_type(), [ 'simple', 'variation' ] ) ) { |
| 46 | 50 | $rules = PriceManager::getPriceRules( $product->get_id() ); |