WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_List_Table_Products::add_variation_parents_for_shipping_class() public WC 1.0

Modifies post query so that it includes parent products whose variations have particular shipping class assigned.

Это метод класса: WC_Admin_List_Table_Products{}

Хуков нет.

Возвращает

Массив. Array of products, including parents of variations.

Использование

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->add_variation_parents_for_shipping_class( $pieces, $wp_query );
$pieces(массив) (обязательный)
Array of SELECT statement pieces (from, where, etc).
$wp_query(WP_Query) (обязательный)
WP_Query instance.

Код WC_Admin_List_Table_Products::add_variation_parents_for_shipping_class() WC 4.5.2

woocommerce/includes/admin/list-tables/class-wc-admin-list-table-products.php
<?php
public function add_variation_parents_for_shipping_class( $pieces, $wp_query ) {
	global $wpdb;
	if ( isset( $_GET['product_shipping_class'] ) && '0' !== $_GET['product_shipping_class'] ) { // WPCS: input var ok.
		$replaced_where   = str_replace( ".post_type = 'product'", ".post_type = 'product_variation'", $pieces['where'] );
		$pieces['where'] .= " OR {$wpdb->posts}.ID in (
			SELECT {$wpdb->posts}.post_parent FROM
			{$wpdb->posts} LEFT JOIN {$wpdb->term_relationships} ON ({$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id)
			WHERE 1=1 $replaced_where
		)";
		return $pieces;
	}
	return $pieces;
}