Merge remote-tracking branch 'origin/master'
# Conflicts: # package.json
This commit is contained in:
commit
c6d2b320f4
|
@ -11,3 +11,5 @@ dist
|
|||
dist-product
|
||||
|
||||
npm-debug.log
|
||||
|
||||
/vendor/
|
||||
|
|
2
404.php
2
404.php
|
@ -14,7 +14,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="404-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="archive-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="author-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
@ -41,7 +41,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
||||
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
||||
<dd>
|
||||
<a href="<?php echo esc_html( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
|
||||
<a href="<?php echo esc_url( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name": "holger1411/understrap",
|
||||
"description": "Combines Automattic´s Underscores Starter Theme and Bootstrap 4",
|
||||
"type": "library",
|
||||
"license": "GPL-2.0",
|
||||
"minimum-stability": "stable",
|
||||
"require": {},
|
||||
"keywords": ["wordpress","theme","bootstrap"],
|
||||
"homepage": "https://github.com/holger1411/understrap"
|
||||
}
|
|
@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="wrapper-footer">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>">
|
||||
<div class="<?php echo esc_attr( $container ); ?>">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -64,9 +64,9 @@ class WP_Bootstrap_Navwalker extends Walker_Nav_Menu {
|
|||
} else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li class="divider" role="presentation">';
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_attr( $item->title );
|
||||
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_html( $item->title );
|
||||
} else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) {
|
||||
$output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
$output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_html( $item->title ) . '</a>';
|
||||
} else {
|
||||
$class_names = $value = '';
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
|
|
|
@ -24,7 +24,7 @@ if ( ! function_exists( 'slbd_count_widgets' ) ) {
|
|||
$widget_count = count( $sidebars_widgets_count[ $sidebar_id ] );
|
||||
$widget_classes = 'widget-count-' . count( $sidebars_widgets_count[ $sidebar_id ] );
|
||||
if ( $widget_count % 4 == 0 || $widget_count > 6 ) :
|
||||
// Four widgets er row if there are exactly four or more than six
|
||||
// Four widgets per row if there are exactly four or more than six
|
||||
$widget_classes .= ' col-md-3';
|
||||
elseif ( 6 == $widget_count ) :
|
||||
// If two widgets are published
|
||||
|
|
|
@ -23,7 +23,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="wrapper-index">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
14
package.json
14
package.json
|
@ -28,26 +28,26 @@
|
|||
"homepage": "https://understrap.com",
|
||||
"dependencies": {
|
||||
"bootstrap": "4.0.0-beta",
|
||||
"browser-sync": "^2.18.11",
|
||||
"del": "^2.2.2",
|
||||
"browser-sync": "^2.18.12",
|
||||
"del": "^3.0.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-clean-css": "^3.3.1",
|
||||
"gulp-clean-css": "^3.7.0",
|
||||
"gulp-clone": "^1.0.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-cssnano": "^2.1.2",
|
||||
"gulp-ignore": "^2.0.2",
|
||||
"gulp-imagemin": "^3.2.0",
|
||||
"gulp-imagemin": "^3.3.0",
|
||||
"gulp-merge": "^0.1.1",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-rimraf": "^0.2.1",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-sourcemaps": "2.6.0",
|
||||
"gulp-uglify": "^2.1.2",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"gulp-watch": "^4.3.11",
|
||||
"merge2": "^1.0.3",
|
||||
"run-sequence": "^1.2.2",
|
||||
"merge2": "^1.1.0",
|
||||
"run-sequence": "^2.0.0",
|
||||
"gulp-sequence": "^0.4.6",
|
||||
"undescores-for-npm": "^1.0.0",
|
||||
"jquery": "3.0.0",
|
||||
|
|
|
@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="page-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="full-width-page-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="page-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="page-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
2
page.php
2
page.php
|
@ -19,7 +19,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="page-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="search-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="wrapper-footer-full">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="footer-full-content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
|
|||
|
||||
<div class="wrapper" id="wrapper-static-hero">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="wrapper-static-content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="single-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<div class="wrapper" id="woocommerce-wrapper">
|
||||
|
||||
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
||||
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
@ -28,7 +28,27 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
|||
|
||||
<main class="site-main" id="main">
|
||||
|
||||
<?php woocommerce_content(); ?>
|
||||
<?php
|
||||
$template_name = '\archive-product.php';
|
||||
$args = array();
|
||||
$template_path = '';
|
||||
$default_path = untrailingslashit( plugin_dir_path(__FILE__) ) . '\woocommerce';
|
||||
|
||||
if ( is_singular( 'product' ) ) {
|
||||
|
||||
woocommerce_content();
|
||||
|
||||
//For ANY product archive, Product taxonomy, product search or /shop landing page etc Fetch the template override;
|
||||
} elseif ( file_exists( $default_path . $template_name ) )
|
||||
{
|
||||
wc_get_template( $template_name, $args, $template_path, $default_path );
|
||||
|
||||
//If no archive-product.php template exists, default to catchall;
|
||||
} else {
|
||||
woocommerce_content( );
|
||||
}
|
||||
|
||||
;?>
|
||||
|
||||
</main><!-- #main -->
|
||||
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* The Template for displaying product archives, including the main shop page which is a post type archive
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.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 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
get_header( 'shop' ); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Woocommerce_before_main_content hook.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
|
||||
|
||||
<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Woocommerce_archive_description hook.
|
||||
*
|
||||
* @hooked woocommerce_taxonomy_archive_description - 10
|
||||
* @hooked woocommerce_product_archive_description - 10
|
||||
*/
|
||||
do_action( 'woocommerce_archive_description' );
|
||||
?>
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Woocommerce_before_shop_loop hook.
|
||||
*
|
||||
* @hooked woocommerce_result_count - 20
|
||||
* @hooked woocommerce_catalog_ordering - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop' );
|
||||
?>
|
||||
|
||||
<?php woocommerce_product_loop_start(); ?>
|
||||
|
||||
<?php woocommerce_product_subcategories(); ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php wc_get_template_part( 'content', 'product' ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
<?php woocommerce_product_loop_end(); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Woocommerce_after_shop_loop hook.
|
||||
*
|
||||
* @hooked woocommerce_pagination - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop' );
|
||||
?>
|
||||
|
||||
<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
|
||||
|
||||
<?php wc_get_template( 'loop/no-products-found.php' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Woocommerce_after_main_content hook.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Woocommerce_sidebar hook.
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
do_action( 'woocommerce_sidebar' );
|
||||
?>
|
||||
|
||||
<?php get_footer( 'shop' ); ?>
|
|
@ -13,27 +13,24 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
wc_print_notices();
|
||||
|
||||
?>
|
||||
/**
|
||||
* @hooked wc_empty_cart_message - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_is_empty' );
|
||||
|
||||
<p class="cart-empty">
|
||||
<?php esc_html_e( 'Your cart is currently empty.', 'understrap' ) ?>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_is_empty' ); ?>
|
||||
|
||||
<?php if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
|
||||
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', 'woocommerce' ) ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Cart Page
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -13,11 +13,11 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.3
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit;
|
||||
}
|
||||
|
||||
wc_print_notices();
|
||||
|
@ -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 _e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-price"><?php _e( 'Price', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php _e( 'Quantity', 'woocommerce' ); ?></th>
|
||||
<th class="product-subtotal"><?php _e( 'Total', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -56,7 +56,7 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
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()->cart->get_remove_url( $cart_item_key ) ),
|
||||
__( 'Remove this item', 'understrap' ),
|
||||
esc_attr__( 'Remove this item', 'woocommerce' ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
), $cart_item_key );
|
||||
|
@ -75,12 +75,12 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-name" data-title="<?php _e( 'Product', 'understrap' ); ?>">
|
||||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ) . ' ';
|
||||
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_title() ), $cart_item, $cart_item_key );
|
||||
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
|
||||
|
@ -88,18 +88,18 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
|
||||
// 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>';
|
||||
echo '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-price" data-title="<?php _e( 'Price', 'understrap' ); ?>">
|
||||
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-quantity" data-title="<?php _e( 'Quantity', 'understrap' ); ?>">
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
|
||||
|
@ -107,8 +107,8 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
$product_quantity = woocommerce_quantity_input( array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(),
|
||||
'min_value' => '0'
|
||||
'max_value' => $_product->get_max_purchase_quantity(),
|
||||
'min_value' => '0',
|
||||
), $_product, false );
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Total', 'understrap' ); ?>">
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Total', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key );
|
||||
?>
|
||||
|
@ -134,12 +134,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 _e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>" />
|
||||
<?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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" name="update_cart" value="<?php esc_attr_e( 'Update Cart', 'woocommerce' ); ?>" />
|
||||
|
||||
<?php do_action( 'woocommerce_cart_actions' ); ?>
|
||||
|
||||
|
@ -150,15 +150,19 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
<?php do_action( 'woocommerce_after_cart_contents' ); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart_table' ); ?>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="cart-collaterals">
|
||||
|
||||
<?php do_action( 'woocommerce_cart_collaterals' ); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* woocommerce_cart_collaterals hook.
|
||||
*
|
||||
* @hooked woocommerce_cross_sell_display
|
||||
* @hooked woocommerce_cart_totals - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_collaterals' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart' ); ?>
|
||||
|
|
|
@ -15,38 +15,36 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.5.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_mini_cart' ); ?>
|
||||
|
||||
<ul class="cart_list product_list_widget <?php echo $args['list_class']; ?>">
|
||||
do_action( 'woocommerce_before_mini_cart' ); ?>
|
||||
|
||||
<?php if ( ! WC()->cart->is_empty() ) : ?>
|
||||
|
||||
<ul class="woocommerce-mini-cart cart_list product_list_widget <?php echo esc_attr( $args['list_class'] ); ?>">
|
||||
<?php
|
||||
do_action( 'woocommerce_before_mini_cart_contents' );
|
||||
|
||||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key );
|
||||
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key );
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
$product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
|
||||
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
||||
?>
|
||||
<li class="<?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
<li class="woocommerce-mini-cart-item <?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
|
||||
'<a href="%s" class="remove" title="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
|
||||
__( 'Remove this item', 'understrap' ),
|
||||
esc_attr__( 'Remove this item', 'woocommerce' ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
), $cart_item_key );
|
||||
|
@ -65,26 +63,20 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_mini_cart_contents' );
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<li class="empty"><?php _e( 'No products in the cart.', 'understrap' ); ?></li>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</ul><!-- end product list -->
|
||||
|
||||
<?php if ( ! WC()->cart->is_empty() ) : ?>
|
||||
|
||||
<p class="total"><strong><?php _e( 'Subtotal', 'understrap' ); ?>:</strong> <?php echo WC()->cart->get_cart_subtotal(); ?></p>
|
||||
<p class="woocommerce-mini-cart__total total"><strong><?php _e( 'Subtotal', 'woocommerce' ); ?>:</strong> <?php echo WC()->cart->get_cart_subtotal(); ?></p>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_shopping_cart_before_buttons' ); ?>
|
||||
|
||||
<p class="buttons">
|
||||
<a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="btn btn-outline-primary"><?php _e( 'View Cart', 'understrap' ); ?></a>
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="btn btn-primary"><?php _e( 'Checkout', 'understrap' ); ?></a>
|
||||
</p>
|
||||
<p class="woocommerce-mini-cart__buttons buttons"><?php do_action( 'woocommerce_widget_shopping_cart_buttons' ); ?></p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p class="woocommerce-mini-cart__empty-message"><?php _e( 'No products in the cart.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.4.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -24,5 +24,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
?>
|
||||
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() ) ;?>" class="btn btn-primary btn-lg btn-block">
|
||||
<?php echo __( 'Proceed to Checkout', 'understrap' ); ?>
|
||||
<?php echo __( 'Proceed to Checkout', 'woocommerce' ); ?>
|
||||
</a>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.3.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -26,7 +26,7 @@ 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() ) {
|
||||
echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'understrap' ) );
|
||||
echo apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ if ( ! $checkout->enable_signup && ! $checkout->enable_guest_checkout && ! is_us
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 id="order_review_heading"><?php _e( 'Your order', 'understrap' ); ?></h3>
|
||||
<h3 id="order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.2
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -25,7 +25,7 @@ if ( ! wc_coupons_enabled() ) {
|
|||
}
|
||||
|
||||
if ( empty( WC()->cart->applied_coupons ) ) {
|
||||
$info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'understrap' ) . ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'understrap' ) . '</a>' );
|
||||
$info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . __( 'Click here to enter your code', 'woocommerce' ) . '</a>' );
|
||||
wc_print_notice( $info_message, 'notice' );
|
||||
}
|
||||
?>
|
||||
|
@ -33,11 +33,11 @@ if ( empty( WC()->cart->applied_coupons ) ) {
|
|||
<form class="checkout_coupon" method="post" style="display:none">
|
||||
|
||||
<p class="form-row form-row-first">
|
||||
<input type="text" name="coupon_code" class="form-control" placeholder="<?php esc_attr_e( 'Coupon code', 'understrap' ); ?>" id="coupon_code" value="" />
|
||||
<input type="text" name="coupon_code" class="form-control" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />
|
||||
</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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply Coupon', 'woocommerce' ); ?>" />
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.5.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -26,9 +26,9 @@ 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 _e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php _e( 'Qty', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php _e( 'Totals', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -76,7 +76,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
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>';
|
||||
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.', 'woocommerce' ) ) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.5.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
|
@ -32,15 +32,15 @@ if ( ! is_ajax() ) {
|
|||
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>';
|
||||
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.', 'woocommerce' ) : __( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '</li>';
|
||||
}
|
||||
?>
|
||||
</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 _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.', 'woocommerce' ); ?>
|
||||
<br/><input type="submit" class="btn btn-primary" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>" />
|
||||
</noscript>
|
||||
|
||||
<?php wc_get_template( 'checkout/terms.php' ); ?>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.1.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -32,11 +32,11 @@ if ( is_user_logged_in() ) {
|
|||
<?php if ( $message ) echo wpautop( wptexturize( $message ) ); ?>
|
||||
|
||||
<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 _e( 'Username or email', 'woocommerce' ); ?> <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 _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="input-text form-control" type="password" name="password" id="password" />
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
@ -45,14 +45,14 @@ if ( is_user_logged_in() ) {
|
|||
|
||||
<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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
|
||||
<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' ); ?>
|
||||
<input name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'woocommerce' ); ?>
|
||||
</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 _e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.5.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -21,5 +21,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
?>
|
||||
<div class="quantity">
|
||||
<input type="number" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( $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' ) ?>" class="input-text qty text form-control" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" />
|
||||
<input type="number" step="<?php echo esc_attr( $step ); ?>" min="<?php echo esc_attr( $min_value ); ?>" max="<?php echo esc_attr( $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', 'woocommerce' ) ?>" class="input-text qty text form-control" size="4" pattern="<?php echo esc_attr( $pattern ); ?>" inputmode="<?php echo esc_attr( $inputmode ); ?>" />
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -59,13 +59,13 @@ do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
|
|||
</a>
|
||||
<?php break;
|
||||
case 'download-remaining' :
|
||||
echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : __( '∞', 'understrap' );
|
||||
echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : __( '∞', 'woocommerce' );
|
||||
break;
|
||||
case 'download-expires' : ?>
|
||||
<?php if ( ! empty( $download['access_expires'] ) ) : ?>
|
||||
<time datetime="<?php echo date( 'Y-m-d', strtotime( $download['access_expires'] ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ); ?></time>
|
||||
<?php else : ?>
|
||||
<?php _e( 'Never', 'understrap' ); ?>
|
||||
<?php _e( 'Never', 'woocommerce' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php break;
|
||||
case 'download-actions' : ?>
|
||||
|
@ -73,7 +73,7 @@ do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
|
|||
$actions = array(
|
||||
'download' => array(
|
||||
'url' => $download['download_url'],
|
||||
'name' => __( 'Download', 'understrap' ),
|
||||
'name' => __( 'Download', 'woocommerce' ),
|
||||
),
|
||||
);
|
||||
if ( $actions = apply_filters( 'woocommerce_account_download_actions', $actions, $download ) ) {
|
||||
|
@ -95,9 +95,9 @@ 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', 'woocommerce' ) ?>
|
||||
</a>
|
||||
<?php esc_html_e( 'No downloads available yet.', 'understrap' ); ?>
|
||||
<?php esc_html_e( 'No downloads available yet.', 'woocommerce' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.6.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -27,33 +27,33 @@ 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>
|
||||
<label for="account_first_name"><?php _e( 'First name', 'woocommerce' ); ?> <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>
|
||||
<label for="account_last_name"><?php _e( 'Last name', 'woocommerce' ); ?> <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>
|
||||
<label for="account_email"><?php _e( 'Email address', 'woocommerce' ); ?> <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 _e( 'Password Change', 'woocommerce' ); ?></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>
|
||||
<label for="password_current"><?php _e( 'Current Password (leave blank to leave unchanged)', 'woocommerce' ); ?></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>
|
||||
<label for="password_1"><?php _e( 'New Password (leave blank to leave unchanged)', 'woocommerce' ); ?></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>
|
||||
<label for="password_2"><?php _e( 'Confirm New Password', 'woocommerce' ); ?></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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>" />
|
||||
<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.3 compatability.
|
||||
* 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,14 +13,14 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'understrap' ) : __( 'Shipping address', 'understrap' );
|
||||
$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'woocommerce' ) : __( 'Shipping address', 'woocommerce' );
|
||||
|
||||
do_action( 'woocommerce_before_edit_account_address_form' ); ?>
|
||||
|
||||
|
@ -36,15 +36,20 @@ do_action( 'woocommerce_before_edit_account_address_form' ); ?>
|
|||
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
|
||||
|
||||
<div class="woocommerce-address-fields__field-wrapper">
|
||||
<?php foreach ( $address as $key => $field ) : ?>
|
||||
<?php woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); ?>
|
||||
<?php endforeach; ?>
|
||||
<?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'] ) );
|
||||
}
|
||||
?>
|
||||
</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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" name="save_address" value="<?php esc_attr_e( 'Save address', 'woocommerce' ); ?>" />
|
||||
<?php wp_nonce_field( 'woocommerce-edit_address' ); ?>
|
||||
<input type="hidden" name="action" value="edit_address" />
|
||||
</p>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.6.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -34,18 +34,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php _e( 'Login', 'understrap' ); ?></h2>
|
||||
<h2><?php _e( 'Login', 'woocommerce' ); ?></h2>
|
||||
|
||||
<form method="post" class="login">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="username"><?php _e( 'Username or email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" />
|
||||
</p>
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="password" name="password" id="password" />
|
||||
</p>
|
||||
|
||||
|
@ -53,13 +53,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>" />
|
||||
<label for="rememberme" class="inline">
|
||||
<input class="woocommerce-Input woocommerce-Input--checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'understrap' ); ?>
|
||||
<input class="woocommerce-Input woocommerce-Input--checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <?php _e( 'Remember me', 'woocommerce' ); ?>
|
||||
</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 _e( 'Lost your password?', 'woocommerce' ); ?></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 _e( 'Register', 'woocommerce' ); ?></h2>
|
||||
|
||||
<form method="post" class="register">
|
||||
|
||||
|
@ -81,35 +81,35 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="reg_username"><?php _e( 'Username', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="reg_username"><?php _e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( $_POST['username'] ); ?>" />
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="reg_email"><?php _e( 'Email address', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="reg_email"><?php _e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" value="<?php if ( ! empty( $_POST['email'] ) ) echo esc_attr( $_POST['email'] ); ?>" />
|
||||
</p>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
|
||||
<label for="reg_password"><?php _e( 'Password', 'understrap' ); ?> <span class="required">*</span></label>
|
||||
<label for="reg_password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" />
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Spam Trap -->
|
||||
<div style="<?php echo ( ( is_rtl() ) ? 'right' : 'left' ); ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'understrap' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" autocomplete="off" /></div>
|
||||
<div style="<?php echo ( ( is_rtl() ) ? 'right' : 'left' ); ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'woocommerce' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" autocomplete="off" /></div>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form' ); ?>
|
||||
<?php do_action( 'register_form' ); ?>
|
||||
|
||||
<p class="woocomerce-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' ); ?>" />
|
||||
<input type="submit" class="woocommerce-Button button" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_end' ); ?>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.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', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'woocommerce' ) ); ?></p>
|
||||
|
||||
<p class="woocommerce-FormRow woocommerce-FormRow--first form-row form-row-first">
|
||||
<label for="user_login"><?php _e( 'Username or email', 'understrap' ); ?></label>
|
||||
<label for="user_login"><?php _e( 'Username or email', 'woocommerce' ); ?></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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Reset Password', 'woocommerce' ); ?>" />
|
||||
</p>
|
||||
|
||||
<?php wp_nonce_field( 'lost_password' ); ?>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.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', __( 'Enter a new password below.', 'woocommerce') ); ?></p>
|
||||
|
||||
<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>
|
||||
<label for="password_1"><?php _e( 'New password', 'woocommerce' ); ?> <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 _e( 'Re-enter new password', 'woocommerce' ); ?> <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' ); ?>" />
|
||||
<input type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Save', 'woocommerce' ); ?>" />
|
||||
</p>
|
||||
|
||||
<?php wp_nonce_field( 'reset_password' ); ?>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -25,12 +25,12 @@ $customer_id = get_current_user_id();
|
|||
|
||||
if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
|
||||
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
|
||||
'billing' => __( 'Billing address', 'understrap' ),
|
||||
'shipping' => __( 'Shipping address', 'understrap' ),
|
||||
'billing' => __( 'Billing address', 'woocommerce' ),
|
||||
'shipping' => __( 'Shipping address', 'woocommerce' ),
|
||||
), $customer_id );
|
||||
} else {
|
||||
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
|
||||
'billing' => __( 'Billing address', 'understrap' ),
|
||||
'billing' => __( 'Billing address', 'woocommerce' ),
|
||||
), $customer_id );
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ $col = 1;
|
|||
?>
|
||||
|
||||
<p>
|
||||
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', __( 'The following addresses will be used on the checkout page by default.', 'understrap' ) ); ?>
|
||||
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', __( 'The following addresses will be used on the checkout page by default.', 'woocommerce' ) ); ?>
|
||||
</p>
|
||||
|
||||
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '<div class="u-columns woocommerce-Addresses col2-set addresses">'; ?>
|
||||
|
@ -49,7 +49,7 @@ $col = 1;
|
|||
<div class="u-column woocommerce-Address">
|
||||
<header class="woocommerce-Address-title title">
|
||||
<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>
|
||||
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a>
|
||||
</header>
|
||||
<address>
|
||||
<?php
|
||||
|
@ -68,7 +68,7 @@ $col = 1;
|
|||
$formatted_address = WC()->countries->get_formatted_address( $address );
|
||||
|
||||
if ( ! $formatted_address )
|
||||
_e( 'You have not set up this type of address yet.', 'understrap' );
|
||||
_e( 'You have not set up this type of address yet.', 'woocommerce' );
|
||||
else
|
||||
echo $formatted_address;
|
||||
?>
|
||||
|
|
|
@ -10,10 +10,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
|
||||
$my_orders_columns = apply_filters( 'woocommerce_my_account_my_orders_columns', array(
|
||||
'order-number' => __( 'Order', 'understrap' ),
|
||||
'order-date' => __( 'Date', 'understrap' ),
|
||||
'order-status' => __( 'Status', 'understrap' ),
|
||||
'order-total' => __( 'Total', 'understrap' ),
|
||||
'order-number' => __( 'Order', 'woocommerce' ),
|
||||
'order-date' => __( 'Date', 'woocommerce' ),
|
||||
'order-status' => __( 'Status', 'woocommerce' ),
|
||||
'order-total' => __( 'Total', 'woocommerce' ),
|
||||
'order-actions' => ' ',
|
||||
) );
|
||||
|
||||
|
@ -27,7 +27,7 @@ $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_q
|
|||
|
||||
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', 'woocommerce' ) ); ?></h2>
|
||||
|
||||
<table class="shop_table shop_table_responsive my_account_orders table-hover table-striped">
|
||||
|
||||
|
@ -52,7 +52,7 @@ if ( $customer_orders ) : ?>
|
|||
|
||||
<?php elseif ( 'order-number' === $column_id ) : ?>
|
||||
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
|
||||
<?php echo _x( '#', 'hash before order number', 'understrap' ) . $order->get_order_number(); ?>
|
||||
<?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number(); ?>
|
||||
</a>
|
||||
|
||||
<?php elseif ( 'order-date' === $column_id ) : ?>
|
||||
|
@ -62,22 +62,22 @@ if ( $customer_orders ) : ?>
|
|||
<?php echo 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 echo sprintf( _n( '%s for %s item', '%s for %s items', $item_count, 'woocommerce' ), $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' )
|
||||
'name' => __( 'Pay', 'woocommerce' )
|
||||
),
|
||||
'view' => array(
|
||||
'url' => $order->get_view_order_url(),
|
||||
'name' => __( 'View', 'understrap' )
|
||||
'name' => __( 'View', 'woocommerce' )
|
||||
),
|
||||
'cancel' => array(
|
||||
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
|
||||
'name' => __( 'Cancel', 'understrap' )
|
||||
'name' => __( 'Cancel', 'woocommerce' )
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -48,7 +48,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
|
||||
<?php elseif ( 'order-number' === $column_id ) : ?>
|
||||
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
|
||||
<?php echo _x( '#', 'hash before order number', 'understrap' ) . $order->get_order_number(); ?>
|
||||
<?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number(); ?>
|
||||
</a>
|
||||
|
||||
<?php elseif ( 'order-date' === $column_id ) : ?>
|
||||
|
@ -60,7 +60,7 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<?php elseif ( 'order-total' === $column_id ) : ?>
|
||||
<?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 );
|
||||
printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count );
|
||||
?>
|
||||
|
||||
<?php elseif ( 'order-actions' === $column_id ) : ?>
|
||||
|
@ -68,15 +68,15 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
$actions = array(
|
||||
'pay' => array(
|
||||
'url' => $order->get_checkout_payment_url(),
|
||||
'name' => __( 'Pay', 'understrap' )
|
||||
'name' => __( 'Pay', 'woocommerce' )
|
||||
),
|
||||
'view' => array(
|
||||
'url' => $order->get_view_order_url(),
|
||||
'name' => __( 'View', 'understrap' )
|
||||
'name' => __( 'View', 'woocommerce' )
|
||||
),
|
||||
'cancel' => array(
|
||||
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
|
||||
'name' => __( 'Cancel', 'understrap' )
|
||||
'name' => __( 'Cancel', 'woocommerce' )
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -107,11 +107,11 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
|
||||
<div class="woocommerce-pagination woocommerce-pagination--without-numbers woocommerce-Pagination">
|
||||
<?php if ( 1 !== $current_page ) : ?>
|
||||
<a class="woocommerce-button woocommerce-button--previous woocommerce-Button woocommerce-Button--previous button" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page - 1 ) ); ?>"><?php _e( 'Previous', 'understrap' ); ?></a>
|
||||
<a class="woocommerce-button woocommerce-button--previous woocommerce-Button woocommerce-Button--previous button" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page - 1 ) ); ?>"><?php _e( 'Previous', 'woocommerce' ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( intval( $customer_orders->max_num_pages ) !== $current_page ) : ?>
|
||||
<a class="woocommerce-button woocommerce-button--next woocommerce-Button woocommerce-Button--next btn btn-outline-primary" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page + 1 ) ); ?>"><?php _e( 'Next', 'understrap' ); ?></a>
|
||||
<a class="woocommerce-button woocommerce-button--next woocommerce-Button woocommerce-Button--next btn btn-outline-primary" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page + 1 ) ); ?>"><?php _e( 'Next', 'woocommerce' ); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -119,9 +119,9 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
|
|||
<?php else : ?>
|
||||
<div class="woocommerce-message woocommerce-message--info 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 _e( 'Go shop', 'understrap' ) ?>
|
||||
<?php _e( 'Go shop', 'woocommerce' ) ?>
|
||||
</a>
|
||||
<?php _e( 'No order has been made yet.', 'understrap' ); ?>
|
||||
<?php _e( 'No order has been made yet.', 'woocommerce' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying product search form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/product-searchform.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.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<div class="input-group">
|
||||
|
||||
<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…', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
|
||||
<input type="hidden" name="post_type" value="product" />
|
||||
<span class="input-group-btn">
|
||||
<input class="submit btn btn-primary" type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>" />
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
* Single variation cart button
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.1.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $product;
|
||||
?>
|
||||
<div class="woocommerce-variation-add-to-cart variations_button">
|
||||
<?php
|
||||
/**
|
||||
* @since 3.0.0.
|
||||
*/
|
||||
do_action( 'woocommerce_before_add_to_cart_quantity' );
|
||||
|
||||
woocommerce_quantity_input( array(
|
||||
'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
|
||||
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
|
||||
'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : $product->get_min_purchase_quantity(),
|
||||
) );
|
||||
|
||||
/**
|
||||
* @since 3.0.0.
|
||||
*/
|
||||
do_action( 'woocommerce_after_add_to_cart_quantity' );
|
||||
?>
|
||||
<button type="submit" class="single_add_to_cart_button btn btn-primary"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
|
||||
<input type="hidden" name="add-to-cart" value="<?php echo absint( $product->get_id() ); ?>" />
|
||||
<input type="hidden" name="product_id" value="<?php echo absint( $product->get_id() ); ?>" />
|
||||
<input type="hidden" name="variation_id" class="variation_id" value="0" />
|
||||
</div>
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Single Product Thumbnails
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* 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
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.2
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -28,10 +28,9 @@ 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' );
|
||||
$image_title = get_post_field( 'post_excerpt', $attachment_id );
|
||||
|
||||
$attributes = array(
|
||||
'title' => $image_title,
|
||||
'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],
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.3.2
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
global $product;
|
||||
|
||||
if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' ) {
|
||||
if ( 'no' === get_option( 'woocommerce_enable_review_rating' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -32,14 +32,9 @@ $average = $product->get_average_rating();
|
|||
|
||||
if ( $rating_count > 0 ) : ?>
|
||||
|
||||
<div class="woocommerce-product-rating" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
||||
<div class="star-rating text-primary" title="<?php printf( __( 'Rated %s out of 5', 'understrap' ), $average ); ?>">
|
||||
<span style="width:<?php echo ( ( $average / 5 ) * 100 ); ?>%">
|
||||
<strong itemprop="ratingValue" class="rating"><?php echo esc_html( $average ); ?></strong> <?php printf( __( 'out of %s5%s', 'understrap' ), '<span itemprop="bestRating">', '</span>' ); ?>
|
||||
<?php printf( _n( 'based on %s customer rating', 'based on %s customer ratings', $rating_count, 'understrap' ), '<span itemprop="ratingCount" class="rating">' . $rating_count . '</span>' ); ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php if ( comments_open() ) : ?><a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'understrap' ), '<span itemprop="reviewCount" class="count">' . $review_count . '</span>' ); ?>)</a><?php endif ?>
|
||||
<div class="woocommerce-product-rating">
|
||||
<?php echo wc_get_rating_html( $average, $rating_count ); ?>
|
||||
<?php if ( comments_open() ) : ?><a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'woocommerce' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a><?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* The template to display the reviewers star rating in reviews
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-product.php.
|
||||
*
|
||||
* 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
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -23,13 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
global $comment;
|
||||
$rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
|
||||
|
||||
if ( $rating && get_option( 'woocommerce_enable_review_rating' ) === 'yes' ) { ?>
|
||||
|
||||
<div class="star-rating">
|
||||
<span style="width:<?php echo ( esc_attr( $rating ) / 5 ) * 100; ?>%"><?php
|
||||
/* translators: %s: rating */
|
||||
printf( esc_html__( '%s out of 5', 'understrap' ), '<strong>' . $rating . '</strong>' );
|
||||
?></span>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
if ( $rating && 'yes' === get_option( 'woocommerce_enable_review_rating' ) ) {
|
||||
echo wc_get_rating_html( $rating );
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 1.6.4
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
|
Reference in New Issue