Home / Admin / Download Manager
Duplicate Snippet

Embed Snippet on Your Site

Download Manager

Support for Download Manager for WC Vendor

Code Preview
php
<?php
/**
 * Stop Download Manager frontend script from loading on the Pro dashboard. 
 *
 */
function wcv_dequeue_wpdm_script() {
	$dashboard_page_id = (array) get_option( 'wcvendors_dashboard_page_id', array() );
	foreach ( $dashboard_page_id as $page_id ) {
		if ( is_page( $page_id ) ) {
			wp_dequeue_script( 'wpdm-frontjs' );
		}
	}
}
add_action( 'wp_print_scripts', 'wcv_dequeue_wpdm_script', 100 );

Comments

Add a Comment