Merge pull request #599 from ZacharyElkins/WooUpdate
Updated WooCommerce template files to 3.3.4 release - Thx @ZacharyElkins !
This commit is contained in:
commit
5eae85e137
|
@ -132,3 +132,12 @@ function understrap_wc_form_field_args( $args, $key, $value = null ) {
|
|||
return $args;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Change loop add-to-cart button class to Bootstrap
|
||||
*/
|
||||
add_filter( 'woocommerce_loop_add_to_cart_args', 'understrap_woocommerce_add_to_cart_args', 10, 2 );
|
||||
function understrap_woocommerce_add_to_cart_args( $args, $product ) {
|
||||
$args['class'] = str_replace('button','btn btn-outline-primary', 'button');
|
||||
return $args;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -30,7 +30,7 @@ do_action( 'woocommerce_cart_is_empty' );
|
|||
if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
|
||||
<p class="return-to-shop">
|
||||
<a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
|
||||
<?php _e( 'Return To Shop', 'understrap' ) ?>
|
||||
<?php _e( 'Return to shop', 'understrap' ) ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -32,10 +32,10 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
<tr>
|
||||
<th class="product-remove"> </th>
|
||||
<th class="product-thumbnail"> </th>
|
||||
<th class="product-name"><?php _e( 'Product', 'understrap' ); ?></th>
|
||||
<th class="product-price"><?php _e( 'Price', 'understrap' ); ?></th>
|
||||
<th class="product-quantity"><?php _e( 'Quantity', 'understrap' ); ?></th>
|
||||
<th class="product-subtotal"><?php _e( 'Total', 'understrap' ); ?></th>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'understrap' ); ?></th>
|
||||
<th class="product-price"><?php esc_html_e( 'Price', 'understrap' ); ?></th>
|
||||
<th class="product-quantity"><?php esc_html_e( 'Quantity', 'understrap' ); ?></th>
|
||||
<th class="product-subtotal"><?php esc_html_e( 'Total', 'understrap' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -53,45 +53,42 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
|
||||
<td class="product-remove">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
|
||||
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
esc_attr__( 'Remove this item', 'understrap' ),
|
||||
__( 'Remove this item', 'understrap' ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
), $cart_item_key );
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-thumbnail">
|
||||
<?php
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
<td class="product-thumbnail"><?php
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( ! $product_permalink ) {
|
||||
echo $thumbnail;
|
||||
} else {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
if ( ! $product_permalink ) {
|
||||
echo $thumbnail;
|
||||
} else {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail );
|
||||
}
|
||||
?></td>
|
||||
|
||||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'understrap' ); ?>">
|
||||
<?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' ';
|
||||
} else {
|
||||
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key );
|
||||
}
|
||||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'understrap' ); ?>"><?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . ' ';
|
||||
} else {
|
||||
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key );
|
||||
}
|
||||
|
||||
// Meta data
|
||||
echo wc_get_formatted_cart_item_data( $cart_item );
|
||||
// Meta data.
|
||||
echo wc_get_formatted_cart_item_data( $cart_item );
|
||||
|
||||
// Backorder notification
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
echo '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'understrap' ) . '</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
// Backorder notification.
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
echo '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'understrap' ) . '</p>';
|
||||
}
|
||||
?></td>
|
||||
|
||||
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'understrap' ); ?>">
|
||||
<?php
|
||||
|
@ -99,22 +96,21 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'understrap' ); ?>">
|
||||
<?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
|
||||
} else {
|
||||
$product_quantity = woocommerce_quantity_input( array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $_product->get_max_purchase_quantity(),
|
||||
'min_value' => '0',
|
||||
), $_product, false );
|
||||
}
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'understrap' ); ?>"><?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
|
||||
} else {
|
||||
$product_quantity = woocommerce_quantity_input( array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $_product->get_max_purchase_quantity(),
|
||||
'min_value' => '0',
|
||||
'product_name' => $_product->get_name(),
|
||||
), $_product, false );
|
||||
}
|
||||
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item );
|
||||
?>
|
||||
</td>
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item );
|
||||
?></td>
|
||||
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Total', 'understrap' ); ?>">
|
||||
<?php
|
||||
|
@ -134,12 +130,12 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
|
||||
<?php if ( wc_coupons_enabled() ) { ?>
|
||||
<div class="coupon">
|
||||
<label for="coupon_code"><?php _e( 'Coupon:', 'understrap' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'understrap' ); ?>" /> <input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'understrap' ); ?>" />
|
||||
<label for="coupon_code"><?php esc_html_e( 'Coupon:', 'understrap' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'understrap' ); ?>" /> <input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'understrap' ); ?>" />
|
||||
<?php do_action( 'woocommerce_cart_coupon' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<input type="submit" class="btn btn-outline-primary" name="update_cart" value="<?php esc_attr_e( 'Update Cart', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'understrap' ); ?>"><?php esc_html_e( 'Update cart', 'understrap' ); ?></button>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_actions' ); ?>
|
||||
|
||||
|
@ -156,12 +152,12 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
<div class="cart-collaterals">
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_cart_collaterals hook.
|
||||
* Cart collaterals hook.
|
||||
*
|
||||
* @hooked woocommerce_cross_sell_display
|
||||
* @hooked woocommerce_cart_totals - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_collaterals' );
|
||||
do_action( 'woocommerce_cart_collaterals' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
|
@ -43,7 +43,7 @@ do_action( 'woocommerce_before_mini_cart' ); ?>
|
|||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
|
||||
'<a href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
__( 'Remove this item', 'understrap' ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $cart_item_key ),
|
||||
|
@ -57,7 +57,7 @@ do_action( 'woocommerce_before_mini_cart' ); ?>
|
|||
<?php echo str_replace( array( 'http:', 'https:' ), '', $thumbnail ) . $product_name . ' '; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php echo WC()->cart->get_item_data( $cart_item ); ?>
|
||||
<?php echo wc_get_formatted_cart_item_data( $cart_item ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '</span>', $cart_item, $cart_item_key ); ?>
|
||||
</li>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 2.4.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() ) ;?>" class="btn btn-primary btn-lg btn-block">
|
||||
<?php echo __( 'Proceed to Checkout', 'understrap' ); ?>
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() );?>" class="btn btn-primary btn-lg btn-block">
|
||||
<?php esc_html_e( 'Proceed to checkout', 'understrap' ); ?>
|
||||
</a>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 2.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -24,8 +24,8 @@ wc_print_notices();
|
|||
|
||||
do_action( 'woocommerce_before_checkout_form', $checkout );
|
||||
|
||||
// If checkout registration is disabled and not logged in, the user cannot checkout.
|
||||
if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_user_logged_in() ) {
|
||||
// If checkout registration is disabled and not logged in, the user cannot checkout
|
||||
if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
|
||||
echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'understrap' ) );
|
||||
return;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_us
|
|||
|
||||
<form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
|
||||
|
||||
<?php if ( sizeof( $checkout->checkout_fields ) > 0 ) : ?>
|
||||
<?php if ( $checkout->get_checkout_fields() ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! wc_coupons_enabled() ) {
|
||||
|
@ -37,7 +37,7 @@ if ( empty( WC()->cart->applied_coupons ) ) {
|
|||
</p>
|
||||
|
||||
<p class="form-row form-row-last">
|
||||
<input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply Coupon', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'understrap' ); ?>"><?php esc_html_e( 'Apply coupon', 'understrap' ); ?></button>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -26,31 +26,33 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<table class="shop_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-name"><?php _e( 'Product', 'understrap' ); ?></th>
|
||||
<th class="product-quantity"><?php _e( 'Qty', 'understrap' ); ?></th>
|
||||
<th class="product-total"><?php _e( 'Totals', 'understrap' ); ?></th>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'understrap' ); ?></th>
|
||||
<th class="product-quantity"><?php esc_html_e( 'Qty', 'understrap' ); ?></th>
|
||||
<th class="product-total"><?php esc_html_e( 'Totals', 'understrap' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ( sizeof( $order->get_items() ) > 0 ) : ?>
|
||||
<?php if ( count( $order->get_items() ) > 0 ) : ?>
|
||||
<?php foreach ( $order->get_items() as $item_id => $item ) : ?>
|
||||
<?php
|
||||
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
|
||||
<td class="product-name">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_order_item_name', esc_html( $item['name'] ), $item, false );
|
||||
echo apply_filters( 'woocommerce_order_item_name', esc_html( $item->get_name() ), $item, false ); // @codingStandardsIgnoreLine
|
||||
|
||||
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order );
|
||||
$order->display_item_meta( $item );
|
||||
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order );
|
||||
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false );
|
||||
|
||||
wc_display_item_meta( $item );
|
||||
|
||||
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false );
|
||||
?>
|
||||
</td>
|
||||
<td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', esc_html( $item['qty'] ) ) . '</strong>', $item ); ?></td>
|
||||
<td class="product-subtotal"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td>
|
||||
<td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', esc_html( $item->get_quantity() ) ) . '</strong>', $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
|
||||
<td class="product-subtotal"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
@ -59,8 +61,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php if ( $totals = $order->get_order_item_totals() ) : ?>
|
||||
<?php foreach ( $totals as $total ) : ?>
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><?php echo $total['label']; ?></th>
|
||||
<td class="product-total"><?php echo $total['value']; ?></td>
|
||||
<th scope="row" colspan="2"><?php echo $total['label']; ?></th><?php // @codingStandardsIgnoreLine ?>
|
||||
<td class="product-total"><?php echo $total['value']; ?></td><?php // @codingStandardsIgnoreLine ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
@ -71,13 +73,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php if ( $order->needs_payment() ) : ?>
|
||||
<ul class="wc_payment_methods payment_methods methods">
|
||||
<?php
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li>' . apply_filters( 'woocommerce_no_available_payment_methods_message', __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'understrap' ) ) . '</li>';
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'understrap' ) ) . '</li>'; // @codingStandardsIgnoreLine
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
@ -88,7 +90,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<?php do_action( 'woocommerce_pay_order_before_submit' ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_pay_order_button_html', '<input type="submit" class="btn btn-primary" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' ); ?>
|
||||
<?php echo apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="btn btn-primary" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<?php do_action( 'woocommerce_pay_order_after_submit' ); ?>
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
@ -27,27 +28,27 @@ if ( ! is_ajax() ) {
|
|||
<?php if ( WC()->cart->needs_payment() ) : ?>
|
||||
<ul class="wc_payment_methods payment_methods methods">
|
||||
<?php
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li>' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_country() ? __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'understrap' ) : __( 'Please fill in your details above to see available payment methods.', 'understrap' ) ) . '</li>';
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'understrap' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'understrap' ) ) . '</li>'; // @codingStandardsIgnoreLine
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<div class="form-row place-order">
|
||||
<noscript>
|
||||
<?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'understrap' ); ?>
|
||||
<br/><input type="submit" class="btn btn-primary" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'understrap' ); ?>" />
|
||||
<?php esc_html_e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'understrap' ); ?>
|
||||
<br/><button type="submit" class="btn btn-primary" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'understrap' ); ?>"><?php esc_html_e( 'Update totals', 'understrap' ); ?></button>
|
||||
</noscript>
|
||||
|
||||
<?php wc_get_template( 'checkout/terms.php' ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_submit' ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="btn btn-primary" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' ); ?>
|
||||
<?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="btn btn-primary" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_submit' ); ?>
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
|
@ -25,18 +25,18 @@ if ( is_user_logged_in() ) {
|
|||
}
|
||||
|
||||
?>
|
||||
<form method="post" class="login" <?php if ( $hidden ) echo 'style="display:none;"'; ?>>
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post" <?php echo ( $hidden ) ? 'style="display:none;"' : ''; ?>>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<?php if ( $message ) echo wpautop( wptexturize( $message ) ); ?>
|
||||
<?php echo ( $message ) ? wpautop( wptexturize( $message ) ) : ''; // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<p class="form-row form-row-first">
|
||||
<label for="username"><?php _e( 'Username or email', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="username"><?php esc_html_e( 'Username or email', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="input-text form-control" name="username" id="username" />
|
||||
</p>
|
||||
<p class="form-row form-row-last">
|
||||
<label for="password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input class="input-text form-control" type="password" name="password" id="password" />
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
@ -44,15 +44,15 @@ if ( is_user_logged_in() ) {
|
|||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-login' ); ?>
|
||||
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>" />
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>"><?php esc_html_e( 'Login', 'understrap' ); ?></button>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ) ?>" />
|
||||
<label for="rememberme" class="inline">
|
||||
<input name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'understrap' ); ?>
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'understrap' ); ?></span>
|
||||
</label>
|
||||
</p>
|
||||
<p class="lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'understrap' ); ?></a>
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'understrap' ); ?></a>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -30,7 +30,7 @@ if ( $max_value && $min_value === $max_value ) {
|
|||
?>
|
||||
<div class="quantity">
|
||||
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php esc_html_e( 'Quantity', 'understrap' ); ?></label>
|
||||
<input type="number" id="<?php echo esc_attr( $input_id ); ?>" class="input-text qty text" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $input_value ); ?>" title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'understrap' ) ?>" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" />
|
||||
<input type="number" id="<?php echo esc_attr( $input_id ); ?>" class="input-text qty text" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $input_value ); ?>" title="<?php echo esc_attr_x( 'Qty', 'Product quantity input tooltip', 'understrap' ) ?>" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" aria-labelledby="<?php echo ! empty( $args['product_name'] ) ? sprintf( esc_attr__( '%s quantity', 'understrap' ), $args['product_name'] ) : ''; ?>" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Loop Add to Cart
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/add-to-cart.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -10,25 +10,26 @@
|
|||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $product;
|
||||
echo apply_filters( 'woocommerce_loop_add_to_cart_link',
|
||||
sprintf( '<div class="add-to-cart-container"><a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="%s product_type_%s single_add_to_cart_button btn btn-outline-primary btn-block %s"> %s</a></div>',
|
||||
|
||||
echo apply_filters( 'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok.
|
||||
sprintf( '<div class="add-to-cart-container"><a href="%s" data-quantity="%s" class="%s product_type_%s single_add_to_cart_button btn btn-outline-primary btn-block %s" %s> %s</a></div>',
|
||||
esc_url( $product->add_to_cart_url() ),
|
||||
esc_attr( $product->get_id() ),
|
||||
esc_attr( $product->get_sku() ),
|
||||
esc_attr( isset( $quantity ) ? $quantity : 1 ),
|
||||
$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',
|
||||
esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ),
|
||||
$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',
|
||||
esc_attr( $product->get_type() ),
|
||||
$product->get_type() == 'simple' ? 'ajax_add_to_cart' : '',
|
||||
$product->get_type() == 'simple' ? 'ajax_add_to_cart' : '',
|
||||
isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '',
|
||||
esc_html( $product->add_to_cart_text() )
|
||||
),
|
||||
$product );
|
||||
$product, $args );
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -27,19 +27,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php
|
||||
// Keep query string vars intact
|
||||
foreach ( $_GET as $key => $val ) {
|
||||
if ( 'orderby' === $key || 'submit' === $key ) {
|
||||
continue;
|
||||
}
|
||||
if ( is_array( $val ) ) {
|
||||
foreach( $val as $innerVal ) {
|
||||
echo '<input type="hidden" name="' . esc_attr( $key ) . '[]" value="' . esc_attr( $innerVal ) . '" />';
|
||||
}
|
||||
} else {
|
||||
echo '<input type="hidden" name="' . esc_attr( $key ) . '" value="' . esc_attr( $val ) . '" />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="paged" value="1" />
|
||||
<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
|
||||
</form>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -38,7 +38,7 @@ do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
|
|||
<?php else : ?>
|
||||
<div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
|
||||
<a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
|
||||
<?php esc_html_e( 'Go Shop', 'understrap' ) ?>
|
||||
<?php esc_html_e( 'Go shop', 'understrap' ) ?>
|
||||
</a>
|
||||
<?php esc_html_e( 'No downloads available yet.', 'understrap' ); ?>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -26,34 +26,34 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>
|
|||
|
||||
<?php do_action( 'woocommerce_edit_account_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
|
||||
<label for="account_first_name"><?php _e( 'First name', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
|
||||
<label for="account_first_name"><?php esc_html_e( 'First name', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_first_name" id="account_first_name" value="<?php echo esc_attr( $user->first_name ); ?>" />
|
||||
</p>
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--last form-row form-row-last">
|
||||
<label for="account_last_name"><?php _e( 'Last name', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
|
||||
<label for="account_last_name"><?php esc_html_e( 'Last name', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_last_name" id="account_last_name" value="<?php echo esc_attr( $user->last_name ); ?>" />
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="account_email"><?php _e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="account_email"><?php esc_html_e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--email input-text form-control" name="account_email" id="account_email" value="<?php echo esc_attr( $user->user_email ); ?>" />
|
||||
</p>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php _e( 'Password Change', 'understrap' ); ?></legend>
|
||||
<legend><?php esc_html_e( 'Password change', 'understrap' ); ?></legend>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="password_current"><?php _e( 'Current Password (leave blank to leave unchanged)', 'understrap' ); ?></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password_current"><?php esc_html_e( 'Current password (leave blank to leave unchanged)', 'understrap' ); ?></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_current" id="password_current" />
|
||||
</p>
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="password_1"><?php _e( 'New Password (leave blank to leave unchanged)', 'understrap' ); ?></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password_1"><?php esc_html_e( 'New password (leave blank to leave unchanged)', 'understrap' ); ?></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_1" id="password_1" />
|
||||
</p>
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="password_2"><?php _e( 'Confirm New Password', 'understrap' ); ?></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password_2"><?php esc_html_e( 'Confirm new password', 'understrap' ); ?></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_2" id="password_2" />
|
||||
</p>
|
||||
</fieldset>
|
||||
|
@ -63,7 +63,7 @@ do_action( 'woocommerce_before_edit_account_form' ); ?>
|
|||
|
||||
<p>
|
||||
<?php wp_nonce_field( 'save_account_details' ); ?>
|
||||
<input type="submit" class="btn btn-outline-primary" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'understrap' ); ?>"><?php esc_html_e( 'Save changes', 'understrap' ); ?></button>
|
||||
<input type="hidden" name="action" value="save_account_details" />
|
||||
</p>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Edit address form
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.9 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-address.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -30,26 +30,26 @@ do_action( 'woocommerce_before_edit_account_address_form' ); ?>
|
|||
|
||||
<form method="post">
|
||||
|
||||
<h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3>
|
||||
<h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3><?php // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<div class="woocommerce-address-fields">
|
||||
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
|
||||
|
||||
<div class="woocommerce-address-fields__field-wrapper">
|
||||
<?php
|
||||
foreach ( $address as $key => $field ) {
|
||||
if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) {
|
||||
$field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] );
|
||||
}
|
||||
woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
|
||||
foreach ( $address as $key => $field ) {
|
||||
if ( isset( $field['country_field'], $address[ $field['country_field'] ] ) ) {
|
||||
$field['country'] = wc_get_post_data_by_key( $field['country_field'], $address[ $field['country_field'] ]['value'] );
|
||||
}
|
||||
woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>
|
||||
|
||||
<p>
|
||||
<input type="submit" class="btn btn-outline-primary" name="save_address" value="<?php esc_attr_e( 'Save address', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="save_address" value="<?php esc_attr_e( 'Save address', 'understrap' ); ?>"><?php esc_html_e( 'Save address', 'understrap' ); ?></button>
|
||||
<?php wp_nonce_field( 'woocommerce-edit_address' ); ?>
|
||||
<input type="hidden" name="action" value="edit_address" />
|
||||
</p>
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -34,32 +34,32 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php _e( 'Login', 'understrap' ); ?></h2>
|
||||
<h2><?php esc_html_e( 'Login', 'understrap' ); ?></h2>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php _e( 'Username or email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" />
|
||||
<label for="password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="password" name="password" id="password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'understrap' ); ?>"><?php esc_html_e( 'Login', 'understrap' ); ?></button>
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php _e( 'Remember me', 'understrap' ); ?></span>
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'understrap' ); ?></span>
|
||||
</label>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'understrap' ); ?></a>
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'understrap' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
@ -72,7 +72,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<div class="u-column2 col-md-6">
|
||||
|
||||
<h2><?php _e( 'Register', 'understrap' ); ?></h2>
|
||||
<h2><?php esc_html_e( 'Register', 'understrap' ); ?></h2>
|
||||
|
||||
<form method="post" class="register">
|
||||
|
||||
|
@ -81,22 +81,22 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_username"><?php _e( 'Username', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
||||
<label for="reg_username"><?php esc_html_e( 'Username', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="reg_username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_email"><?php _e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( $_POST['email'] ) : ''; ?>" />
|
||||
<label for="reg_email"><?php esc_html_e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="email" id="reg_email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( $_POST['email'] ) : ''; ?>" />
|
||||
</p>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" />
|
||||
<label for="reg_password"><?php esc_html_e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password" id="reg_password" />
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
@ -105,7 +105,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<p class="woocommerce-FormRow form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
|
||||
<input type="submit" class="woocommerce-Button button" name="register" value="<?php esc_attr_e( 'Register', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" name="register" value="<?php esc_attr_e( 'Register', 'understrap' ); ?>"><?php esc_html_e( 'Register', 'understrap' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_end' ); ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Lost password form
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-lost-password.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -24,10 +24,10 @@ wc_print_notices(); ?>
|
|||
|
||||
<form method="post" class="woocommerce-ResetPassword lost_reset_password">
|
||||
|
||||
<p><?php echo apply_filters( 'woocommerce_lost_password_message', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'understrap' ) ); ?></p>
|
||||
<p><?php echo apply_filters( 'woocommerce_lost_password_message', esc_html__( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'understrap' ) ); ?></p><?php // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
|
||||
<label for="user_login"><?php _e( 'Username or email', 'understrap' ); ?></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
|
||||
<label for="user_login"><?php esc_html_e( 'Username or email', 'understrap' ); ?></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="text" name="user_login" id="user_login" />
|
||||
</p>
|
||||
|
||||
|
@ -37,7 +37,7 @@ wc_print_notices(); ?>
|
|||
|
||||
<p class="woocommerce-form-row form-row">
|
||||
<input type="hidden" name="wc_reset_password" value="true" />
|
||||
<input type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Reset Password', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Reset password', 'understrap' ); ?>"><?php esc_html_e( 'Reset password', 'understrap' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php wp_nonce_field( 'lost_password' ); ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Lost password reset form.
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-reset-password.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -24,14 +24,14 @@ wc_print_notices(); ?>
|
|||
|
||||
<form method="post" class="woocommerce-ResetPassword lost_reset_password">
|
||||
|
||||
<p><?php echo apply_filters( 'woocommerce_reset_password_message', __( 'Enter a new password below.', 'understrap') ); ?></p>
|
||||
<p><?php echo apply_filters( 'woocommerce_reset_password_message', esc_html__( 'Enter a new password below.', 'understrap') ); ?></p><?php // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
|
||||
<label for="password_1"><?php _e( 'New password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
|
||||
<label for="password_1"><?php esc_html_e( 'New password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_1" id="password_1" />
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
|
||||
<label for="password_2"><?php _e( 'Re-enter new password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="password_2"><?php esc_html_e( 'Re-enter new password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_2" id="password_2" />
|
||||
</p>
|
||||
|
||||
|
@ -44,7 +44,7 @@ wc_print_notices(); ?>
|
|||
|
||||
<p class="woocommerce-form-row form-row">
|
||||
<input type="hidden" name="wc_reset_password" value="true" />
|
||||
<input type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Save', 'understrap' ); ?>" />
|
||||
<button type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Save', 'understrap' ); ?>"><?php esc_html_e( 'Save', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php wp_nonce_field( 'reset_password' ); ?>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* My Addresses
|
||||
*
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-address.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -14,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 2.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -42,7 +41,9 @@ $col = 1;
|
|||
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', __( 'The following addresses will be used on the checkout page by default.', 'understrap' ) ); ?>
|
||||
</p>
|
||||
|
||||
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '<div class="u-columns woocommerce-Addresses col2-set addresses">'; ?>
|
||||
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) : ?>
|
||||
<div class="u-columns woocommerce-Addresses col2-set addresses">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ( $get_addresses as $name => $title ) : ?>
|
||||
|
||||
|
@ -51,30 +52,14 @@ $col = 1;
|
|||
<h3><?php echo $title; ?></h3>
|
||||
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'understrap' ); ?></a>
|
||||
</header>
|
||||
<address>
|
||||
<?php
|
||||
$address = apply_filters( 'woocommerce_my_account_my_address_formatted_address', array(
|
||||
'first_name' => get_user_meta( $customer_id, $name . '_first_name', true ),
|
||||
'last_name' => get_user_meta( $customer_id, $name . '_last_name', true ),
|
||||
'company' => get_user_meta( $customer_id, $name . '_company', true ),
|
||||
'address_1' => get_user_meta( $customer_id, $name . '_address_1', true ),
|
||||
'address_2' => get_user_meta( $customer_id, $name . '_address_2', true ),
|
||||
'city' => get_user_meta( $customer_id, $name . '_city', true ),
|
||||
'state' => get_user_meta( $customer_id, $name . '_state', true ),
|
||||
'postcode' => get_user_meta( $customer_id, $name . '_postcode', true ),
|
||||
'country' => get_user_meta( $customer_id, $name . '_country', true ),
|
||||
), $customer_id, $name );
|
||||
|
||||
$formatted_address = WC()->countries->get_formatted_address( $address );
|
||||
|
||||
if ( ! $formatted_address )
|
||||
_e( 'You have not set up this type of address yet.', 'understrap' );
|
||||
else
|
||||
echo $formatted_address;
|
||||
?>
|
||||
</address>
|
||||
<address><?php
|
||||
$address = wc_get_account_formatted_address( $name );
|
||||
echo $address ? wp_kses_post( $address ) : esc_html_e( 'You have not set up this type of address yet.', 'understrap' );
|
||||
?></address>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '</div>'; ?>
|
||||
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) : ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* My Orders
|
||||
* My Orders - Deprecated
|
||||
*
|
||||
* @deprecated 2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
|
||||
* @deprecated 2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -22,12 +22,12 @@ $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_q
|
|||
'meta_key' => '_customer_user',
|
||||
'meta_value' => get_current_user_id(),
|
||||
'post_type' => wc_get_order_types( 'view-orders' ),
|
||||
'post_status' => array_keys( wc_get_order_statuses() )
|
||||
'post_status' => array_keys( wc_get_order_statuses() ),
|
||||
) ) );
|
||||
|
||||
if ( $customer_orders ) : ?>
|
||||
|
||||
<h2><?php echo apply_filters( 'woocommerce_my_account_my_orders_title', __( 'Recent Orders', 'understrap' ) ); ?></h2>
|
||||
<h2><?php echo apply_filters( 'woocommerce_my_account_my_orders_title', __( 'Recent orders', 'understrap' ) ); ?></h2>
|
||||
|
||||
<table class="shop_table shop_table_responsive my_account_orders table-hover table-striped">
|
||||
|
||||
|
@ -56,44 +56,26 @@ if ( $customer_orders ) : ?>
|
|||
</a>
|
||||
|
||||
<?php elseif ( 'order-date' === $column_id ) : ?>
|
||||
<time datetime="<?php echo date( 'Y-m-d', strtotime( $order->order_date ) ); ?>" title="<?php echo esc_attr( strtotime( $order->order_date ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></time>
|
||||
<time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time>
|
||||
|
||||
<?php elseif ( 'order-status' === $column_id ) : ?>
|
||||
<?php echo wc_get_order_status_name( $order->get_status() ); ?>
|
||||
<?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?>
|
||||
|
||||
<?php elseif ( 'order-total' === $column_id ) : ?>
|
||||
<?php echo sprintf( _n( '%s for %s item', '%s for %s items', $item_count, 'understrap' ), $order->get_formatted_order_total(), $item_count ); ?>
|
||||
<?php
|
||||
/* translators: 1: formatted order total 2: total order items */
|
||||
printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'understrap' ), $order->get_formatted_order_total(), $item_count );
|
||||
?>
|
||||
|
||||
<?php elseif ( 'order-actions' === $column_id ) : ?>
|
||||
<?php
|
||||
$actions = array(
|
||||
'pay' => array(
|
||||
'url' => $order->get_checkout_payment_url(),
|
||||
'name' => __( 'Pay', 'understrap' )
|
||||
),
|
||||
'view' => array(
|
||||
'url' => $order->get_view_order_url(),
|
||||
'name' => __( 'View', 'understrap' )
|
||||
),
|
||||
'cancel' => array(
|
||||
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
|
||||
'name' => __( 'Cancel', 'understrap' )
|
||||
)
|
||||
);
|
||||
|
||||
if ( ! $order->needs_payment() ) {
|
||||
unset( $actions['pay'] );
|
||||
}
|
||||
|
||||
if ( ! in_array( $order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) ) ) {
|
||||
unset( $actions['cancel'] );
|
||||
}
|
||||
|
||||
if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) {
|
||||
foreach ( $actions as $key => $action ) {
|
||||
echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-outline-primary ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
|
||||
}
|
||||
$actions = wc_get_account_orders_actions( $order );
|
||||
|
||||
if ( ! empty( $actions ) ) {
|
||||
foreach ( $actions as $key => $action ) {
|
||||
echo '<a href="' . esc_url( $action['url'] ) . '" class="btn btn-outline-primary ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 2.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -23,11 +23,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
?>
|
||||
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<div class="input-group">
|
||||
|
||||
<label class="sr-only" for="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>"><?php esc_html_e( 'Search for:', 'woocommerce' ); ?></label>
|
||||
<input type="search" id="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>" class="search-field field form-control" placeholder="<?php echo esc_attr__( 'Search products…', 'understrap' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
|
||||
<input type="hidden" name="post_type" value="product" />
|
||||
<span class="input-group-append">
|
||||
<input class="submit btn btn-primary" type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'understrap' ); ?>" />
|
||||
</span>
|
||||
<button class="submit btn btn-primary" type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'understrap' ); ?>"><?php echo esc_html_x( 'Search', 'submit button', 'understrap' ); ?></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Simple product add to cart
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/add-to-cart/simple.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.0.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
|
@ -31,7 +31,7 @@ if ( $product->is_in_stock() ) : ?>
|
|||
|
||||
<?php do_action( 'woocommerce_before_add_to_cart_form' ); ?>
|
||||
|
||||
<form class="cart" method="post" enctype='multipart/form-data'>
|
||||
<form class="cart" action="<?php echo esc_url( get_permalink() ); ?>" method="post" enctype='multipart/form-data'>
|
||||
<?php
|
||||
/**
|
||||
* @since 2.1.0.
|
||||
|
@ -55,7 +55,7 @@ if ( $product->is_in_stock() ) : ?>
|
|||
do_action( 'woocommerce_after_add_to_cart_quantity' );
|
||||
?>
|
||||
|
||||
<button type="submit" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button button alt"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" class="btn btn-outline-primary"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
|
||||
|
||||
<?php
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.0.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Single Product Thumbnails
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-thumbnails.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $post, $product;
|
||||
|
||||
$attachment_ids = $product->get_gallery_image_ids();
|
||||
|
||||
if ( $attachment_ids && has_post_thumbnail() ) {
|
||||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
$full_size_image = wp_get_attachment_image_src( $attachment_id, 'full' );
|
||||
$thumbnail = wp_get_attachment_image_src( $attachment_id, 'shop_thumbnail' );
|
||||
$attributes = array(
|
||||
'title' => get_post_field( 'post_title', $attachment_id ),
|
||||
'data-caption' => get_post_field( 'post_excerpt', $attachment_id ),
|
||||
'data-src' => $full_size_image[0],
|
||||
'data-large_image' => $full_size_image[0],
|
||||
'data-large_image_width' => $full_size_image[1],
|
||||
'data-large_image_height' => $full_size_image[2],
|
||||
);
|
||||
|
||||
$html = '<div data-thumb="' . esc_url( $thumbnail[0] ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_size_image[0] ) . '">';
|
||||
$html .= wp_get_attachment_image( $attachment_id, 'shop_single', false, $attributes );
|
||||
$html .= '</a></div>';
|
||||
|
||||
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $attachment_id );
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* The template to display the reviewers star rating in reviews
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/review-rating.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $comment;
|
||||
$rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
|
||||
|
||||
if ( $rating && 'yes' === get_option( 'woocommerce_enable_review_rating' ) ) {
|
||||
echo wc_get_rating_html( $rating );
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Single product short description
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/short-description.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.2
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $post;
|
||||
|
||||
if ( ! $post->post_excerpt ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div itemprop="description" class="lead">
|
||||
<?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
|
||||
</div>
|
Reference in New Issue