Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions

PaymentGatewaysController::get_post_install_scripts()public staticWC 1.0

Get payment gateway scripts for post-install.

{} It's a method of the class: PaymentGatewaysController{}

No Hooks.

Return

Array. Install scripts.

Usage

$result = PaymentGatewaysController::get_post_install_scripts( $gateway );
$gateway(WC_Payment_Gateway) (required)
Payment gateway object.

Code of PaymentGatewaysController::get_post_install_scripts() WC 6.6.1

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;
}