WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

ShippingLabelBanner::add_print_shipping_label_script() public WC 1.0

Adds JS to order page to render shipping banner.

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

No Hooks.

Return

null. Nothing.

Usage

$ShippingLabelBanner = new ShippingLabelBanner();
$ShippingLabelBanner->add_print_shipping_label_script( $hook );
$hook(string) (required)
current page hook.

Code of ShippingLabelBanner::add_print_shipping_label_script() WC 5.3.0

<?php
public function add_print_shipping_label_script( $hook ) {
	$rtl = is_rtl() ? '.rtl' : '';
	wp_enqueue_style(
		'print-shipping-label-banner-style',
		Loader::get_url( "print-shipping-label-banner/style{$rtl}", 'css' ),
		array( 'wp-components' ),
		Loader::get_file_version( 'css' )
	);

	$script_assets_filename = Loader::get_script_asset_filename( 'wp-admin-scripts', 'print-shipping-label-banner' );
	$script_assets          = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/' . $script_assets_filename;

	wp_enqueue_script(
		'print-shipping-label-banner',
		Loader::get_url( 'wp-admin-scripts/print-shipping-label-banner', 'js' ),
		array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
		Loader::get_file_version( 'js' ),
		true
	);

	$payload = array(
		'nonce'                 => wp_create_nonce( 'wp_rest' ),
		'baseURL'               => get_rest_url(),
		'wcs_server_connection' => true,
	);

	wp_localize_script( 'print-shipping-label-banner', 'wcConnectData', $payload );
}