文件操作 - DoubleTheDonation.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/give/src/FormMigration/Steps/DoubleTheDonation.php
编辑文件内容
<?php namespace Give\FormMigration\Steps; use Give\FormMigration\Contracts\FormMigrationStep; use Give\Framework\Blocks\BlockModel; /** * @since 3.8.0 */ class DoubleTheDonation extends FormMigrationStep { /** * @since 3.8.0 */ public function canHandle(): bool { return $this->formV2->getDoubleTheDonationStatus() === 'enabled'; } /** * @since 3.8.0 */ public function process() { $block = BlockModel::make([ 'name' => 'givewp/dtd', 'attributes' => [ 'label' => $this->formV2->getDoubleTheDonationLabel(), 'company' => [ 'company_id' => '', 'company_name' => '', 'entered_text' => '', ], ], ]); $this->fieldBlocks->insertAfter('givewp/donation-amount', $block); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件