array(
'test_mode' => $this->get_test_mode(),
'gateways' => array(
'id' => 'gateways',
'name' => __( 'Active Gateways', 'easy-digital-downloads' ),
'desc' => __( 'Choose the payment gateways you want to enable.', 'easy-digital-downloads' ),
'type' => 'gateways',
'options' => $gateways,
),
'default_gateway' => array(
'id' => 'default_gateway',
'name' => __( 'Default Gateway', 'easy-digital-downloads' ),
'desc' => __( 'Choose the gateway your checkout will use by default.
If you choose Automatic, the first enabled gateway from the Active Gateways will be used.', 'easy-digital-downloads' ),
'type' => 'gateway_select',
'options' => $gateways,
),
'accepted_cards' => array(
'id' => 'accepted_cards',
'name' => __( 'Payment Method Icons', 'easy-digital-downloads' ),
'desc' => __( 'Display icons for the selected payment methods.', 'easy-digital-downloads' ) . '
' . __( 'You will also need to configure your gateway settings if you are accepting credit cards.', 'easy-digital-downloads' ),
'type' => 'payment_icons',
'options' => apply_filters(
'edd_accepted_payment_icons',
array(
'mastercard' => 'Mastercard',
'visa' => 'Visa',
'americanexpress' => 'American Express',
'discover' => 'Discover',
'paypal' => 'PayPal',
)
),
),
),
'checkout' => array(
'enforce_ssl' => array(
'id' => 'enforce_ssl',
'name' => __( 'Enforce SSL on Checkout', 'easy-digital-downloads' ),
'check' => __( 'Enforced', 'easy-digital-downloads' ),
'desc' => __( 'Redirect all customers to the secure checkout page. You must have an SSL certificate installed to use this option.', 'easy-digital-downloads' ),
'type' => 'checkbox_description',
),
'redirect_on_add' => array(
'id' => 'redirect_on_add',
'name' => __( 'Redirect to Checkout', 'easy-digital-downloads' ),
'desc' => __( 'Immediately redirect to checkout after adding an item to the cart?', 'easy-digital-downloads' ),
'type' => 'checkbox',
'tooltip_title' => __( 'Redirect to Checkout', 'easy-digital-downloads' ),
'tooltip_desc' => __( 'When enabled, once an item has been added to the cart, the customer will be redirected directly to your checkout page. This is useful for stores that sell single items.', 'easy-digital-downloads' ),
),
'logged_in_only' => array(
'id' => 'logged_in_only',
'name' => __( 'Require Login', 'easy-digital-downloads' ),
'desc' => __( 'Require that users be logged-in to purchase files.', 'easy-digital-downloads' ),
'type' => 'checkbox',
'tooltip_title' => __( 'Require Login', 'easy-digital-downloads' ),
'tooltip_desc' => __( 'You can require that customers create and login to user accounts prior to purchasing from your store by enabling this option. When unchecked, users can purchase without being logged in by using their name and email address.', 'easy-digital-downloads' ),
),
'show_register_form' => array(
'id' => 'show_register_form',
'name' => __( 'Show Register / Login Form', 'easy-digital-downloads' ),
'desc' => __( 'Display the registration and login forms on the checkout page for non-logged-in users.', 'easy-digital-downloads' ),
'type' => 'select',
'std' => 'none',
'options' => array(
'both' => __( 'Registration and Login Forms', 'easy-digital-downloads' ),
'registration' => __( 'Registration Form Only', 'easy-digital-downloads' ),
'login' => __( 'Login Form Only', 'easy-digital-downloads' ),
'none' => __( 'None', 'easy-digital-downloads' ),
),
),
'enable_cart_saving' => array(
'id' => 'enable_cart_saving',
'name' => __( 'Enable Cart Saving', 'easy-digital-downloads' ),
'desc' => __( 'Check this to enable cart saving on the checkout.', 'easy-digital-downloads' ),
'type' => 'checkbox',
'tooltip_title' => __( 'Cart Saving', 'easy-digital-downloads' ),
'tooltip_desc' => __( 'Cart saving allows shoppers to create a temporary link to their current shopping cart so they can come back to it later, or share it with someone.', 'easy-digital-downloads' ),
),
'moderation_settings' => array(
'id' => 'moderation_settings',
'name' => '
@example.com
), or TLDs (.gov
).', 'easy-digital-downloads' ),
'type' => 'textarea',
'placeholder' => __( '@example.com', 'easy-digital-downloads' ),
),
),
'refunds' => array(
'refunds_settings' => array(
'id' => 'refunds_settings',
'name' => '30
days. Set to 0
for infinity. It can be changed at a per-product level.', 'easy-digital-downloads' ),
'std' => 30,
'type' => 'number',
'size' => 'small',
'max' => 3650, // Ten year maximum, because why explicitly support longer
'min' => 0,
'step' => 1,
),
),
'accounting' => $this->get_accounting_settings(),
);
}
/**
* Get the test mode setting.
*
* @since 3.1.4
* @return array
*/
private function get_test_mode() {
$test_mode = array(
'id' => 'test_mode',
'name' => __( 'Test Mode', 'easy-digital-downloads' ),
'check' => __( 'Enabled', 'easy-digital-downloads' ),
'desc' => __( 'While test mode is enabled, no live transactions are processed.' . $order_number->format( get_option( 'edd_next_order_number' ) ) . '
'
);
}
return $setting;
}
/**
* Gets the sequential help text.
*
* @since 3.1.4
* @return string
*/
private function get_sequential_help_text() {
$text = __( 'Gain access to even more control over your order numbering!', 'easy-digital-downloads' );
$benefits = array(
__( 'Track free orders in a separate sequential series', 'easy-digital-downloads' ),
__( 'Assign temporary numbers to incomplete orders', 'easy-digital-downloads' ),
__( 'Abandoned orders do not interrupt the complete order series', 'easy-digital-downloads' ),
);
$text .= '