Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter luismi78

    (@luismi78)

    Resolved:

    if (!function_exists('woo_wallet_credit_purchase_completed_callback')) {
        function woo_wallet_credit_purchase_completed_callback($transaction_id, $order) {
            if ($order->get_total('edit') > 50) {
                woo_wallet()->wallet->credit($order->get_customer_id(), 15, 'Regalo de 15 € en recargas superiores a 50 €');
            }
        }
    }
    add_action('woo_wallet_credit_purchase_completed', 'woo_wallet_credit_purchase_completed_callback', 10, 2);
Viewing 1 replies (of 1 total)