Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter hugopve

    (@hugopve)

    I have also tried the following:

    // Save item custom fields label and value as order item meta data
    add_action( ‘woocommerce_order_status_processing’, ‘add_order_meta_from_product_meta’, 10, 2 );
    function add_order_meta_from_product_meta( $item_id, $item ) {
    $product = $item-> get_product();
    $start = $product->get_meta(‘WooCommerceEventsDate’);

    if( ! empty($start) ) {
    $order->update_meta_data( ‘WooCommerceEventsDate’, $start );
    $order->save();
    }
    }

Viewing 1 replies (of 1 total)