WC_Gateway_Paypal::admin_scripts()publicWC 3.3.0

Load admin scripts.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WC_Gateway_Paypal = new WC_Gateway_Paypal();
$WC_Gateway_Paypal->admin_scripts();

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

С версии 3.3.0 Введена.

Код WC_Gateway_Paypal::admin_scripts() WC 8.7.0

public function admin_scripts() {
	$screen    = get_current_screen();
	$screen_id = $screen ? $screen->id : '';

	if ( 'woocommerce_page_wc-settings' !== $screen_id ) {
		return;
	}

	$suffix  = Constants::is_true( 'SCRIPT_DEBUG' ) ? '' : '.min';
	$version = Constants::get_constant( 'WC_VERSION' );

	wp_enqueue_script( 'woocommerce_paypal_admin', WC()->plugin_url() . '/includes/gateways/paypal/assets/js/paypal-admin' . $suffix . '.js', array(), $version, true );
}