Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions
PaymentGatewaysController::get_post_install_scripts()
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() PaymentGatewaysController::get post install scripts WC 9.7.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; }