Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions

PaymentGatewaysController::get_post_install_scripts()public staticWC 1.0

Get payment gateway scripts for post-install.

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

Хуков нет.

Возвращает

Массив. Install scripts.

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

$result = PaymentGatewaysController::get_post_install_scripts( $gateway );
$gateway(WC_Payment_Gateway) (обязательный)
Payment gateway object.

Код PaymentGatewaysController::get_post_install_scripts() WC 8.7.0

public static function get_post_install_scripts( $gateway ) {
	$scripts    = array();
	$wp_scripts = wp_scripts();

	$handles = method_exists( $gateway, 'get_post_install_script_handles' )
		? $gateway->get_post_install_script_handles()
		: array();

	foreach ( $handles as $handle ) {
		if ( isset( $wp_scripts->registered[ $handle ] ) ) {
			$scripts[] = $wp_scripts->registered[ $handle ];
		}
	}

	return $scripts;
}