0

Please tell me! I added a checkbox to the line for order item in admin order page, that informs that the product was put in the order

 add_action('woocommerce_admin_order_item_headers', 'my_woocommerce_admin_order_item_headers');
function my_woocommerce_admin_order_item_headers() {
    $column_name = 'TEXT';
    echo '<th>' . $column_name . '</th>';
}

add_action('woocommerce_admin_order_item_values', 'my_woocommerce_admin_order_item_values', 10, 3);
function my_woocommerce_admin_order_item_values($_product, $item, $item_id = null) {

if($item['type']=="line_item")
     echo '<style>   input:checked + span {
    background: green;
      color: white;
       padding: 10px;}
       </style>
       <td width="20%"> 
<div class="container">
  <form action="#" method="post">
    <div class="checkbox">
     <input type="checkbox" name="a6"><span>Yes</span>
    </div>
  </form>
</div>
       </td>'; }

enter image description here enter image description here

How to make this checkbox remember that the product was placed in the order. Please help!

  • Can you give more information of your code or what you try to achieve? – Pradipta Sarkar Aug 23 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.