mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Create the settings.
This commit is contained in:
parent
5e2d4228ef
commit
199517f403
1 changed files with 44 additions and 1 deletions
|
@ -9,4 +9,47 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace WooCommerce\PayPalCommerce\Uninstall;
|
namespace WooCommerce\PayPalCommerce\Uninstall;
|
||||||
|
|
||||||
return array();
|
use WooCommerce\PayPalCommerce\Onboarding\State;
|
||||||
|
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'wcgateway.settings.fields' => static function ( $container, array $fields ): array {
|
||||||
|
$uninstall_fields = array(
|
||||||
|
'uninstall_heading' => array(
|
||||||
|
'heading' => __( 'Uninstall/Clear Database', 'woocommerce-paypal-payments' ),
|
||||||
|
'type' => 'ppcp-heading',
|
||||||
|
'screens' => array(
|
||||||
|
State::STATE_ONBOARDED,
|
||||||
|
),
|
||||||
|
'requirements' => array(),
|
||||||
|
'gateway' => Settings::CONNECTION_TAB_ID,
|
||||||
|
'description' => __( 'Manage plugin data and scheduled actions stored in database.', 'woocommerce-paypal-payments' ),
|
||||||
|
),
|
||||||
|
'uninstall_clear_db_on_uninstall' => array(
|
||||||
|
'title' => __( 'Remove PayPal Payments data from Database on uninstall', 'woocommerce-paypal-payments' ),
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => __( 'Remove options and scheduled actions from database when uninstalling the plugin.', 'woocommerce-paypal-payments' ),
|
||||||
|
'default' => false,
|
||||||
|
'screens' => array(
|
||||||
|
State::STATE_START,
|
||||||
|
State::STATE_ONBOARDED,
|
||||||
|
),
|
||||||
|
'requirements' => array(),
|
||||||
|
'gateway' => Settings::CONNECTION_TAB_ID,
|
||||||
|
),
|
||||||
|
'uninstall_clear_db_now' => array(
|
||||||
|
'title' => __( 'Remove PayPal Payments data from Database.', 'woocommerce-paypal-payments' ),
|
||||||
|
'type' => 'ppcp-text',
|
||||||
|
'text' => '<button type="button" class="button ppcp-uninstall-clear_now">' . esc_html__( 'Clear now', 'woocommerce-paypal-payments' ) . '</button>',
|
||||||
|
'screens' => array(
|
||||||
|
State::STATE_ONBOARDED,
|
||||||
|
),
|
||||||
|
'requirements' => array(),
|
||||||
|
'gateway' => Settings::CONNECTION_TAB_ID,
|
||||||
|
'description' => __( 'Click to remove options and scheduled actions from database now.', 'woocommerce-paypal-payments' ),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
return array_merge( $fields, $uninstall_fields );
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue