H
H
HAtan2020-08-31 17:49:12
WordPress
HAtan, 2020-08-31 17:49:12

How to add a column in the "Positions" block on the Woocommerce - Orders page?

There is a variable product for 2 days, which depends on the selected day of the order, the names of the dishes (highlighted in red) are substituted from the names of existing products.
https://nakormimmamu.ru/food-stock/standard-menu/z... I
5f4d03c004fea285390686.jpeg
fill in the options in the admin panel in the selecte of all products.

$myselprods = get_posts(array(
                   'post_type' => 'product',
                   'numberposts' => -1,
                   'orderby'=> 'title', 
             'order' => 'ASC'
                ));
<td><select style="width: 100%;">
  <option></option>
<?php
  foreach ($myselprods as $pst) {                              
      
    echo '<option selected="selected" value="' . esc_html($pst->post_title) . '">' . esc_html($pst->post_title) . '</option>';
                                       
  ?></select>
</td>

How to transfer these id of these dishes to the order form, otherwise it is not clear which one was chosen.

5f4d0d72ee2cc511617671.png

Mb, someone knows which file is responsible for this or how to turn it around, I thought that order-details-item.php but it seems not

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question