0

I'm trying to append the atribute value of pa-lager to delieverynotes and invoices. I'm working from this answer.

This is what I have:

function lager_placering( $product ) {
 if( isset( $product->id ) ) {
$lager = $product->get_attribute('pa_lager');
//echo $lager;
}
}

add_action( 'wcdn_order_item_after', 'lager_placering' );

It does not work. at all.

tiny
  • 287
  • 1
  • 9

1 Answers1

0

This works like a charm

function lager_placering( $product ) {
$lager = $product->get_attribute('pa_lager');
echo $lager;
}
add_action( 'wcdn_order_item_after', 'lager_placering' );
tiny
  • 287
  • 1
  • 9