| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template variables: |
| 4 |
* |
| 5 |
* @var $controllers array Widgets/Addons Settings |
| 6 |
*/ |
| 7 |
|
| 8 |
// Do not allow directly accessing this file. |
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit( 'This script cannot be accessed directly.' ); |
| 11 |
} |
| 12 |
?> |
| 13 |
<div class="rtsb-shipping-method"> |
| 14 |
|
| 15 |
<table class="rtsb_woocommerce_shipping_methods"> |
| 16 |
<?php |
| 17 |
|
| 18 |
/* |
| 19 |
wc()->frontend_includes(); |
| 20 |
if(empty(WC()->cart->cart_contents)) { |
| 21 |
WC()->session = new \WC_Session_Handler(); |
| 22 |
WC()->session->init(); |
| 23 |
WC()->customer = new \WC_Customer(get_current_user_id(), true); |
| 24 |
WC()->cart = new \WC_Cart(); |
| 25 |
} |
| 26 |
*/ |
| 27 |
|
| 28 |
WC()->cart->calculate_totals(); |
| 29 |
|
| 30 |
if(WC()->cart && WC()->cart->needs_shipping() && WC()->cart->show_shipping()) : |
| 31 |
?> |
| 32 |
<?php do_action('woocommerce_review_order_before_shipping'); ?> |
| 33 |
<?php if( ! empty( $controllers['show_title'] ) ){ ?> |
| 34 |
<tr> |
| 35 |
<td> |
| 36 |
<?php |
| 37 |
$htmltag = ! empty( $controllers['title_html_tag'] ) ? $controllers['title_html_tag'] : 'h2'; |
| 38 |
$title_text = ! empty( $controllers['title_text'] ) ? $controllers['title_text'] : esc_html__('Shipping', 'shopbuilder' ); |
| 39 |
printf( '<%1$s class="shipping-method-title">%2$s</%1$s>', esc_html( $htmltag ), $title_text ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 40 |
?> |
| 41 |
</td> |
| 42 |
</tr> |
| 43 |
<?php } ?> |
| 44 |
<?php wc_cart_totals_shipping_html(); ?> |
| 45 |
|
| 46 |
<?php do_action('woocommerce_review_order_after_shipping'); ?> |
| 47 |
|
| 48 |
<?php |
| 49 |
endif; |
| 50 |
|
| 51 |
?> |
| 52 |
</table> |
| 53 |
|
| 54 |
</div> |
| 55 |
|
| 56 |
|