• Resolved lkafrazier

    (@lkafrazier)


    Hello,

    I have an add action snippet added globally above my add to cart button.

    add_action( 'woocommerce_before_add_to_cart_button' , 'aj_add_below_prod_var', 5 );
    
    function aj_add_below_prod_var() {
      echo '<span style="font-weight:bold; color:red;"> Quantities are in HALF YARD increments.  1 = Half Yard, 2 = Full Yard, 3 = 1.5 Yards, etc. </span>';
    }

    However, I just realized I have ONE particular product that this action will need to NOT apply to.

    How would I write the code to say IF Product ID is 12808 remove the above action?

    Thank you!!!

    • This topic was modified 3 years, 9 months ago by lkafrazier.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove an Action from a certain product’ is closed to new replies.