Merge pull request #30987 from woocommerce/fix/27793

add phpdoc block with gist reference to woocommerce_package_rates filter
This commit is contained in:
Peter Fabian 2021-10-20 15:43:18 +02:00 committed by GitHub
commit 75dbec00fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -358,7 +358,13 @@ class WC_Shipping {
}
}
// Filter the calculated rates.
/**
* Filter the calculated shipping rates.
*
* @see https://gist.github.com/woogists/271654709e1d27648546e83253c1a813 for cache invalidation methods.
* @param array $package['rates'] Package rates.
* @param array $package Package of cart items.
*/
$package['rates'] = apply_filters( 'woocommerce_package_rates', $package['rates'], $package );
// Store in session to avoid recalculation.