Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Woocommerce admin panel - color quantity >2

I create this message because I can not find my answer ... I am looking for a way that in woocommerce, when a person orders a quantity greater than 2, the number of the quantity is highlighted in a color.

I put a screenshot to show what screen I'm talking about in woocommerce.

My request is not complicated but I can't find any way to do it...

Thanks in advance

admin panel order

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

    add_action('admin_footer', function () {

        echo <<<'EOT'
<script type="text/javascript">
    jQuery(function($){
    var qty_string = $("#order_line_items .quantity .view").html();
    var qty_amount = qty_string.charAt(qty_string.length-3);
    if( qty_amount > 2 ){
     $("#order_line_items .quantity .view").css("color", "red");
    }
    });
</script>
EOT;
    }, 99999);
    

Add the below code to your active theme functions.php file

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!