woocommerce_shipping_calculator()
Output the cart shipping calculator.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
woocommerce_shipping_calculator( $button_text );
- $button_text(строка)
- Text for the shipping calculation toggle.
По умолчанию: ''
Код woocommerce_shipping_calculator() woocommerce shipping calculator WC 9.2.3
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, ) ); }