woocommerce_shipping_calculator()
Output the cart shipping calculator.
Хуков нет.
Возвращает
void. Ничего (null).
Использование
woocommerce_shipping_calculator( $button_text );
- $button_text(строка)
- Text for the shipping calculation toggle.
По умолчанию:''
Код woocommerce_shipping_calculator() woocommerce shipping calculator WC 11.2.2
function woocommerce_shipping_calculator( $button_text = '' ) {
if ( 'no' === get_option( 'woocommerce_enable_shipping_calc' ) || ! WC()->cart->needs_shipping() ) {
return;
}
wp_enqueue_script( 'wc-country-select' );
wc_get_template(
'cart/shipping-calculator.php',
array(
'button_text' => $button_text,
)
);
}