WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features\Navigation

Init::maybe_enqueue_opt_out_scripts() public WC 1.0

Enqueue the opt out scripts.

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

No Hooks.

Return

null. Nothing.

Usage

$Init = new Init();
$Init->maybe_enqueue_opt_out_scripts();

Code of Init::maybe_enqueue_opt_out_scripts() WC 5.3.0

<?php
public function maybe_enqueue_opt_out_scripts() {
	if ( 'yes' !== get_option( 'woocommerce_navigation_show_opt_out', 'no' ) ) {
		return;
	}

	$rtl = is_rtl() ? '.rtl' : '';
	wp_enqueue_style(
		'wc-admin-navigation-opt-out',
		Loader::get_url( "navigation-opt-out/style{$rtl}", 'css' ),
		array( 'wp-components' ),
		Loader::get_file_version( 'css' )
	);

	$script_assets_filename = Loader::get_script_asset_filename( 'wp-admin-scripts', 'navigation-opt-out' );
	$script_assets          = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/' . $script_assets_filename;

	wp_enqueue_script(
		'wc-admin-navigation-opt-out',
		Loader::get_url( 'wp-admin-scripts/navigation-opt-out', 'js' ),
		array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
		Loader::get_file_version( 'js' ),
		true
	);

	wp_localize_script(
		'wc-admin-navigation-opt-out',
		'surveyData',
		array(
			'url' => Survey::get_url( '/new-navigation-opt-out' ),
		)
	);

	delete_option( 'woocommerce_navigation_show_opt_out' );
}