Overview
Good news! Modern Retail and WooCommerce has introduced a solution that will allow retailers to easily implement 3rd party gift cards on their websites. In this article, we'll review how to add this solution to your WooCommerce website.
Adding the Filter
To allow 3rd party gift card transactions to move smoothly through the middleware to the POS System, you have to add a few lines of code in your theme or a custom plugin.
To get started, you will need to declare this function:
get_the_giftcard_value_from_database
Next, add this function:
add_filter('mr_order_api', function($data, $order_id){
$data['giftcard_value'] = get_the_giftcard_value_from_database($order_id);
return $data;
});
This function will allow you to add a gift card's value to an order, allowing it to assign value to the 3rd party gift card.
Once you have this filter in place, it is recommended that you place a test order for a full and partial redemption of a gift card to make sure it flows all the way through to your POS system.
For any more questions, please submit a support request in the Admin Panel.