Automattic\WooCommerce\Admin\Features\Blueprint\Exporters

ExportWCPaymentGateways::export()publicWC 1.0

Export the step

Method of the class: ExportWCPaymentGateways{}

No Hooks.

Return

Step.

Usage

$ExportWCPaymentGateways = new ExportWCPaymentGateways();
$ExportWCPaymentGateways->export(): Step;

ExportWCPaymentGateways::export() code WC 9.7.1

public function export(): Step {
	$step = new SetWCPaymentGateways();
	$this->maybe_hide_wcpay_gateways();
	foreach ( $this->get_wc_payment_gateways() as $id => $payment_gateway ) {
		if ( in_array( $id, $this->exclude_ids, true ) ) {
			continue;
		}

		$step->add_payment_gateway(
			$id,
			$payment_gateway->get_title(),
			$payment_gateway->get_description(),
			$payment_gateway->is_available() ? 'yes' : 'no'
		);
	}

	return $step;
}