Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task #171108 chore: Trigger changes #138

Open
wants to merge 1 commit into
base: release-1.4.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/com_tjvendors/admin/models/payout.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ public function changePayoutStatus($payout_id, $paidUnpaid)
{
// Update their details in the users table using id as the primary key.
$result = Factory::getDbo()->updateObject('#__tjvendors_passbook', $object, 'id');
// Plugin trigger
PluginHelper::importPlugin('tjvendors');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('tjVendorOnPayoutStatusChange', $object);

return true;
}
Expand Down
15 changes: 15 additions & 0 deletions src/plugins/tjvendors/tjvendors/tjvendors.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,19 @@ public function tjVendorOnAfterVendorSave($data)
public function tjVendorOnAfterPayoutPaid($id, $data)
{
}

/**
* On after payout status is changed
*
* Method is called after payout status is changed.
*
* @param object $object Holds the payout data.
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function tjVendorOnPayoutStatusChange($object = null)
{
}
}