WC_Admin_Taxonomies::scripts_at_product_cat_screen_footer()

Admin footer scripts for the product categories admin screen


Description Description


Return Return

(void)


Top ↑

Source Source

File: includes/admin/class-wc-admin-taxonomies.php

	public function scripts_at_product_cat_screen_footer() {
		if ( ! isset( $_GET['taxonomy'] ) || 'product_cat' !== $_GET['taxonomy'] ) { // WPCS: CSRF ok, input var ok.
			return;
		}
		// Ensure the tooltip is displayed when the image column is disabled on product categories.
		wc_enqueue_js(
			"(function( $ ) {
				'use strict';
				var product_cat = $( 'tr#tag-" . absint( $this->default_cat_id ) . "' );
				product_cat.find( 'th' ).empty();
				product_cat.find( 'td.thumb span' ).detach( 'span' ).appendTo( product_cat.find( 'th' ) );
			})( jQuery );"
		);
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.