Skip to content

Payouts

Hook Reference

HookDescription
fluent_affiliate/payout/processedFired after a payout batch has been fully processed.
fluent_affiliate/payout/transaction/deletingFired just before a payout transaction is deleted.
fluent_affiliate/payout/transaction/deletedFired after a payout transaction has been deleted.
fluent_affiliate/payout/transaction/transaction_updated_to_{transaction}See source.

fluent_affiliate/payout/processed

Fired after a payout batch has been fully processed.

Parameters

ParameterTypeDescription
$payoutPayoutThe Payout model that was processed.
$affiliatesarrayArray of Affiliate models included in the payout.

Source: app/Http/Controllers/PayoutController.php

php
add_action('fluent_affiliate/payout/processed', function($payout, $affiliates) {
    foreach ($affiliates as $affiliate) {
        // Send payment notifications, trigger PayPal mass pay, etc.
    }
}, 10, 2);

fluent_affiliate/payout/transaction/deleting

Fired just before a payout transaction is deleted.

Parameters

ParameterTypeDescription
$transactionTransactionThe Transaction model about to be deleted.
$payoutPayoutThe parent Payout model.

Source: app/Http/Controllers/PayoutController.php

php
add_action('fluent_affiliate/payout/transaction/deleting', function($transaction, $payout) {
    // Reverse any external payment before deletion.
}, 10, 2);

fluent_affiliate/payout/transaction/deleted

Fired after a payout transaction has been deleted.

Parameters

ParameterTypeDescription
$transactionIdintID of the deleted transaction.
$payoutPayoutThe parent Payout model.

Source: app/Http/Controllers/PayoutController.php

php
add_action('fluent_affiliate/payout/transaction/deleted', function($transactionId, $payout) {
    // Post-deletion audit logging.
}, 10, 2);

fluent_affiliate/payout/transaction/transaction_updated_to_{transaction}

Dynamic hook — the suffix is determined at runtime. See source for exact usage.

Source: app/Http/Controllers/PayoutController.php

Released under the GPL-2.0 License.