Gift Cards: Include column with Gift Card amount

Hello

We have code for another Gift Cards plugin, you should adapt it.
Just use $line—>get_meta(“amount”) to read net value.

Please, visit https://docs.algolplus.com/algol_order_export/add-new-fields/
And seek for “gift card”.

Worked very well with this:

// Gift Card, add meta keys "card_number" and "amount_redeemed"
add_filter( "woe_fetch_order", function($row, $order ){
	foreach( $order->get_items( 'gift_card' ) as $order_item_id => $line ) {
		$row["card_number"] = $line->get_code();
		$row["amount_redeemed"] = $line->get_amount();
	}
	return $row;
},10,2);

Thank you!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Your Advertisement Here