HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpmuhibbah_err/wp-content/plugins/give/src/Form/LegacyConsumer/ServiceProvider.php
<?php

namespace Give\Form\LegacyConsumer;

use Give\Form\LegacyConsumer\Actions\AddCustomFieldsToLegacyReceipt;
use Give\Form\LegacyConsumer\Commands\DeprecateOldTemplateHook;
use Give\Helpers\Hooks;
use Give\Receipt\DonationReceipt;
use Give\ServiceProviders\ServiceProvider as ServiceProviderInterface;
use Give_Donate_Form;

class ServiceProvider implements ServiceProviderInterface
{

    /**
     * @inheritDoc
     */
    public function register()
    {
        include_once plugin_dir_path(__FILE__) . '/functions.php';
        give()->bind(
            DeprecateOldTemplateHook::class,
            function () {
                global $wp_filter;

                return new DeprecateOldTemplateHook($wp_filter);
            }
        );

        give()->singleton(UniqueIdAttributeGenerator::class);
    }

    /**
     * @inheritDoc
     */
    public function boot()
    {
        give(TemplateHooks::class)->walk(give(Commands\SetupNewTemplateHook::class));
        if ( ! wp_doing_ajax()) {
            give(TemplateHooks::class)->walk(give(Commands\DeprecateOldTemplateHook::class));
        }

        add_action(
            'give_checkout_error_checks',
            function () {
                $formId = absint($_POST['give-form-id']);
                give(TemplateHooks::class)->walk(new Commands\SetupFieldValidation($formId));
            }
        );

        add_action(
            'give_form_html_tags',
            /**
             * @since 2.14.0
             *
             * @param array $formHtmlAttributes
             * @param Give_Donate_Form $form
             *
             * @return void
             */
            function ($formHtmlAttributes, $form) {
                return give(TemplateHooks::class)->reduce(
                    new AddEnctypeAttributeInDonationForm($form->ID),
                    $formHtmlAttributes
                );
            },
            10,
            2
        );

        add_action(
            'give_insert_payment',
            function ($donationID, $donationData) {
                give(TemplateHooks::class)->walk(new Commands\SetupFieldPersistence($donationID, $donationData));
            },
            10,
            2
        );

        add_action(
            'give_new_receipt',
            function (DonationReceipt $receipt) {
                give(TemplateHooks::class)->walk(new Commands\SetupFieldReceipt($receipt));
            }
        );

        add_action(
            'give_payment_receipt_after',
            function ($payment, $receipt_args) {
                give(TemplateHooks::class)->walk(new Commands\SetupFieldConfirmation($payment, $receipt_args));
            },
            10,
            2
        );

        add_action(
            'give_add_email_tags',
            function () {
                give(TemplateHooks::class)->walk(new Commands\SetupFieldEmailTag);
            }
        );

        Hooks::addAction('give_new_receipt', AddCustomFieldsToLegacyReceipt::class);
    }
}