WC_Admin_Setup_Wizard::get_wizard_available_in_cart_payment_gateways()protectedWC 1.0

Устарела с версии 4.6.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Array of all possible "in cart" gateways that can be offered.

Метод класса: WC_Admin_Setup_Wizard{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_wizard_available_in_cart_payment_gateways();

Список изменений

Устарела с 4.6.0

Код WC_Admin_Setup_Wizard::get_wizard_available_in_cart_payment_gateways() WC 8.7.0

protected function get_wizard_available_in_cart_payment_gateways() {
	_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' );
	$user_email = $this->get_current_user_email();

	$stripe_description = '<p>' . sprintf(
		/* translators: %s: URL */
		__( 'Accept debit and credit cards in 135+ currencies, methods such as Alipay, and one-touch checkout with Apple Pay. <a href="%s" target="_blank">Learn more</a>.', 'woocommerce' ),
		'https://woo.com/products/stripe/'
	) . '</p>';
	$paypal_checkout_description = '<p>' . sprintf(
		/* translators: %s: URL */
		__( 'Safe and secure payments using credit cards or your customer\'s PayPal account. <a href="%s" target="_blank">Learn more</a>.', 'woocommerce' ),
		'https://woo.com/products/woocommerce-gateway-paypal-checkout/'
	) . '</p>';
	$klarna_checkout_description = '<p>' . sprintf(
		/* translators: %s: URL */
		__( 'Full checkout experience with pay now, pay later and slice it. No credit card numbers, no passwords, no worries. <a href="%s" target="_blank">Learn more about Klarna</a>.', 'woocommerce' ),
		'https://woo.com/products/klarna-checkout/'
	) . '</p>';
	$klarna_payments_description = '<p>' . sprintf(
		/* translators: %s: URL */
		__( 'Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries. <a href="%s" target="_blank">Learn more about Klarna</a>.', 'woocommerce' ),
		'https://woo.com/products/klarna-payments/ '
	) . '</p>';
	$square_description = '<p>' . sprintf(
		/* translators: %s: URL */
		__( 'Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place. <a href="%s" target="_blank">Learn more about Square</a>.', 'woocommerce' ),
		'https://woo.com/products/square/'
	) . '</p>';

	return array(
		'stripe'          => array(
			'name'        => __( 'WooCommerce Stripe Gateway', 'woocommerce' ),
			'image'       => WC()->plugin_url() . '/assets/images/stripe.png',
			'description' => $stripe_description,
			'class'       => 'checked stripe-logo',
			'repo-slug'   => 'woocommerce-gateway-stripe',
			'settings'    => array(
				'create_account' => array(
					'label'       => __( 'Set up Stripe for me using this email:', 'woocommerce' ),
					'type'        => 'checkbox',
					'value'       => 'yes',
					'default'     => 'yes',
					'placeholder' => '',
					'required'    => false,
					'plugins'     => $this->get_wcs_requisite_plugins(),
				),
				'email'          => array(
					'label'       => __( 'Stripe email address:', 'woocommerce' ),
					'type'        => 'email',
					'value'       => $user_email,
					'placeholder' => __( 'Stripe email address', 'woocommerce' ),
					'required'    => true,
				),
			),
		),
		'ppec_paypal'     => array(
			'name'        => __( 'WooCommerce PayPal Checkout Gateway', 'woocommerce' ),
			'image'       => WC()->plugin_url() . '/assets/images/paypal.png',
			'description' => $paypal_checkout_description,
			'enabled'     => false,
			'class'       => 'checked paypal-logo',
			'repo-slug'   => 'woocommerce-gateway-paypal-express-checkout',
			'settings'    => array(
				'reroute_requests' => array(
					'label'       => __( 'Set up PayPal for me using this email:', 'woocommerce' ),
					'type'        => 'checkbox',
					'value'       => 'yes',
					'default'     => 'yes',
					'placeholder' => '',
					'required'    => false,
					'plugins'     => $this->get_wcs_requisite_plugins(),
				),
				'email'            => array(
					'label'       => __( 'Direct payments to email address:', 'woocommerce' ),
					'type'        => 'email',
					'value'       => $user_email,
					'placeholder' => __( 'Email address to receive payments', 'woocommerce' ),
					'required'    => true,
				),
			),
		),
		'paypal'          => array(
			'name'        => __( 'PayPal Standard', 'woocommerce' ),
			'description' => __( 'Accept payments via PayPal using account balance or credit card.', 'woocommerce' ),
			'image'       => '',
			'settings'    => array(
				'email' => array(
					'label'       => __( 'PayPal email address:', 'woocommerce' ),
					'type'        => 'email',
					'value'       => $user_email,
					'placeholder' => __( 'PayPal email address', 'woocommerce' ),
					'required'    => true,
				),
			),
		),
		'klarna_checkout' => array(
			'name'        => __( 'Klarna Checkout for WooCommerce', 'woocommerce' ),
			'description' => $klarna_checkout_description,
			'image'       => WC()->plugin_url() . '/assets/images/klarna-black.png',
			'enabled'     => true,
			'class'       => 'klarna-logo',
			'repo-slug'   => 'klarna-checkout-for-woocommerce',
		),
		'klarna_payments' => array(
			'name'        => __( 'Klarna Payments for WooCommerce', 'woocommerce' ),
			'description' => $klarna_payments_description,
			'image'       => WC()->plugin_url() . '/assets/images/klarna-black.png',
			'enabled'     => true,
			'class'       => 'klarna-logo',
			'repo-slug'   => 'klarna-payments-for-woocommerce',
		),
		'square'          => array(
			'name'        => __( 'WooCommerce Square', 'woocommerce' ),
			'description' => $square_description,
			'image'       => WC()->plugin_url() . '/assets/images/square-black.png',
			'class'       => 'square-logo',
			'enabled'     => false,
			'repo-slug'   => 'woocommerce-square',
		),
		'eway'            => array(
			'name'        => __( 'WooCommerce eWAY Gateway', 'woocommerce' ),
			'description' => __( 'The eWAY extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.', 'woocommerce' ),
			'image'       => WC()->plugin_url() . '/assets/images/eway-logo.jpg',
			'enabled'     => false,
			'class'       => 'eway-logo',
			'repo-slug'   => 'woocommerce-gateway-eway',
		),
		'payfast'         => array(
			'name'        => __( 'WooCommerce PayFast Gateway', 'woocommerce' ),
			'description' => __( 'The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs.', 'woocommerce' ),
			'image'       => WC()->plugin_url() . '/assets/images/payfast.png',
			'class'       => 'payfast-logo',
			'enabled'     => false,
			'repo-slug'   => 'woocommerce-payfast-gateway',
			'file'        => 'gateway-payfast.php',
		),
	);
}