Home Forums Add-ons Repeater Field Woocommerce Cart Item issue


Woocommerce Cart Item issue

  • Hello,

    I just created custom field type for my woocomemrce website. it’s showed woocommerce checkout page. When customer added product into the cart, than they can see the cart item list by select filed.Now it’s display the cart item list but when i place the order , the back-end order disappeared!!!

    Note :
    1. I used this field inside the Repeater Field.
    2. follow this resource for creating new field :
    3. Value not send with woocommerce Order Email
    4. Valuse not saved in ‘Order Backend’ panel,

    I used this code for display the cart item value :

    function render_field( $field ) {

    echo ‘<select name=”‘ . $field[‘key’] . ‘”>’;
    $items =WC()->cart->get_cart();
    foreach($items as $item => $values) {
    $_product = $values[‘data’]->post;
    $price = get_post_meta($values[‘product_id’] , ‘_price’, true);
    echo “<option value=”.$values[‘product_id’].”>”.$_product->post_title.”-“.$price.”</option>”;
    echo ‘</select>’;

    Note : $items =WC()->cart->get_cart(); this line create conflict with Woocommece Order Backend.

    Attached Screenshot :
    Frontend :
    Order Backend :
    ACF Field :

    Thanks for your time.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.