• Resolved phplatypus

    (@phplatypus)


    Hello everyone!

    Neat Plug-In.
    However I’m looking for a way to check in the functions.php if a product has a discount added via Bulk Discount. I want to add a tab on a product with further information about the bulk discount, but only if the product does offer one.

    Something like:

    $hasBulkDiscount = /*get boolean or value here*/;
    
    if ($hasBulkDiscount){
        //add tab (I already prepared this part)
    }

    Does anybody have a clue?

    https://www.ads-software.com/plugins/woocommerce-bulk-discount/

Viewing 1 replies (of 1 total)
  • Thread Starter phplatypus

    (@phplatypus)

    Welp, I stumbled over the answer while digging into the code for something else.
    $hasBulkDiscount = get_post_meta( $thepostid, "_bulkdiscount_enabled", true );
    Returns true only if a discount was added via Bulk Discount. Hope this helps anyone. ??

Viewing 1 replies (of 1 total)
  • The topic ‘Check if product has bulk discount’ is closed to new replies.