Support » Plugin: WooCommerce Bulk Discount » Only Display discount information in Product Detail if one is set

  • kieranbarnes

    (@kieranbarnes)


    Here’s a modified single_product_summary() that will only show the discount info if it’s set in the product.

    I needed this because I was styling productinfo-show-discounts

    public function single_product_summary() {
    
    			global $thepostid, $post;
    			if ( !$thepostid ) $thepostid = $post->ID;
    
    			$foo = get_post_meta( $thepostid, '_bulkdiscount_text_info', true );
    
    			if ($foo) {
    				echo "<div class='productinfo-show-discounts'>";
    				echo $foo;
    				echo "</div>";
    			}
    
    		}

    http://wordpress.org/plugins/woocommerce-bulk-discount/

Viewing 1 replies (of 1 total)
  • Thanks kieranbarnes, ill try this once I figure out how to actually display the bulk grid on the product page. Do you have any idea how?

Viewing 1 replies (of 1 total)
  • The topic ‘Only Display discount information in Product Detail if one is set’ is closed to new replies.