Question: wp product children orderby meta value not working

Question

wp product children orderby meta value not working

Answers 0
Added at 2017-01-04 16:01
Tags
Question

Get product children not working when used orderby meta_value.

This is my table example :

CODE       DÉSIGNATION                      UV    PRIX HT

K 283      ENSEMBLE DE SUSPENSION FUSIBLÉ   1     $1855
K 307      PINCE D’ANCRAGE AVEC ANSE        50    $250

And this is my code :

add_filter( 'woocommerce_grouped_children_args', 'enano_custom_grouped_children_args' );
function enano_custom_grouped_children_args( $args ){
    $args['orderby'] = 'meta_value';
    $args['meta_key'] = 'code_produit';
    $args['order'] = 'DESC';
}

I want show my table like that:

CODE       DÉSIGNATION                      UV    PRIX HT

K 307      PINCE D’ANCRAGE AVEC ANSE        50    $250
K 283      ENSEMBLE DE SUSPENSION FUSIBLÉ   1     $1855

But that's not working !

Answers
Source Show
◀ Wstecz