Allow packages to be reorganized after calculating the shipping. This filter can be used to apply some extra manipulation after the shipping costs are calculated for the packages but before WooCommerce does anything with them. A good example of usage is to merge the shipping methods for multiple packages for marketplaces.
$this->packages
Sortie :
@param array $packages The array of packages after shipping costs are calculated.
// Modifier la valeur avec le filtre 'woocommerce_shipping_packages'
add_filter('woocommerce_shipping_packages', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($this->packages) {
// Modifier la valeur
return $this->packages;
}
Chargement des actualités...