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

woocommerce_cart_shipping_packages хук-фильтр . WC 1.5.4

Get packages to calculate shipping for.

This lets us calculate costs for carts that are shipped to multiple locations.

Shipping methods are responsible for looping through these packages.

By default we pass the cart itself as a package - plugins can change this. through the filter and break it up.

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

add_filter( 'woocommerce_cart_shipping_packages', 'filter_function_name_2644' );
function filter_function_name_2644( $array ){
	// filter...

	return $array;
}
$array
-

Список изменений

С версии 1.5.4 Введена.

Где вызывается хук

WC_Cart::get_shipping_packages()
woocommerce_cart_shipping_packages
woocommerce/includes/class-wc-cart.php 1466-1488
return apply_filters(
	'woocommerce_cart_shipping_packages',
	array(
		array(
			'contents'        => $this->get_items_needing_shipping(),
			'contents_cost'   => array_sum( wp_list_pluck( $this->get_items_needing_shipping(), 'line_total' ) ),
			'applied_coupons' => $this->get_applied_coupons(),
			'user'            => array(
				'ID' => get_current_user_id(),
			),
			'destination'     => array(
				'country'   => $this->get_customer()->get_shipping_country(),
				'state'     => $this->get_customer()->get_shipping_state(),
				'postcode'  => $this->get_customer()->get_shipping_postcode(),
				'city'      => $this->get_customer()->get_shipping_city(),
				'address'   => $this->get_customer()->get_shipping_address(),
				'address_1' => $this->get_customer()->get_shipping_address(), // Provide both address and address_1 for backwards compatibility.
				'address_2' => $this->get_customer()->get_shipping_address_2(),
			),
			'cart_subtotal'   => $this->get_displayed_subtotal(),
		),
	)
);

Где используется хук в ядре WooCommerce

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