php - How to add checkbox column in WooCommerce product listing in WordPress admin panel to update meta value with ajax -
i have add column checkbox wordpress/woocommerce product listing in admin panel.
its purpose update meta parameter of product without entering quick edit.
i added checkbox column, have problem placing column before featured star column on attached image. how update meta ajax in such case?
current code:
add_action( 'manage_product_posts_custom_column', 'print_extra_columns', 15, 3 ); add_filter( 'manage_product_posts_columns', 'add_extra_columns', 15 ); function print_extra_columns( $value, $column_name ) { if( $value == "extra" ) { $checkbox ='<input type="checkbox" name="extra" />'; echo $checkbox; } } function add_extra_columns( $defaults ) { $defaults['extra'] = 'extra'; return $defaults; }
Comments
Post a Comment