0

I have created a metbox with advanced custom fields for the woocommerce admin edit order page. Now I want to display that metadata in my account. But not being displayed. Where is the problem?

function add_account_orders_column_rows2 ( $order ) {
    if ( $value = $order->get_field( 'custom_price' ) ) {
        echo esc_html( $value );   
    }
}
add_action( 'woocommerce_my_account_my_orders_column_price_colums', 'add_account_orders_column_rows2' );
2
  • I'm not an expert in ACF plugin, put I guess when you add a meta field to woocommerce post type product, it's still will be the same meta as you add it to any post type. Don't think it extends Order class. Did you tried to get value as usually using standart syntax like get_field( "text_field" ), without $order->get_field("text_field") – anton May 3 at 14:51
  • I already try this method. but not work... – cholonto May 3 at 15:56

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.