0c6ca4d0 by Jeff Balicki

woo

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 0dd30e79
Showing 31 changed files with 1522 additions and 3 deletions
...@@ -16312,6 +16312,9 @@ li.crumb a { ...@@ -16312,6 +16312,9 @@ li.crumb a {
16312 background-color: #fff !important; 16312 background-color: #fff !important;
16313 } 16313 }
16314 16314
16315 .woocommerce-page .select2-container--default .select2-selection--single,
16316 .woocommerce-page select,
16317 .woocommerce-page input,
16315 .woocommerce-input-wrapper .select2-container--default .select2-selection--single, 16318 .woocommerce-input-wrapper .select2-container--default .select2-selection--single,
16316 .woocommerce-input-wrapper select, 16319 .woocommerce-input-wrapper select,
16317 .woocommerce-input-wrapper input { 16320 .woocommerce-input-wrapper input {
...@@ -16323,6 +16326,10 @@ li.crumb a { ...@@ -16323,6 +16326,10 @@ li.crumb a {
16323 display: none !important; 16326 display: none !important;
16324 } 16327 }
16325 16328
16329 .woocommerce-orders .woocommerce-message .woocommerce-Button {
16330 display: none !important;
16331 }
16332
16326 .has-blue-color, 16333 .has-blue-color,
16327 .has-blue-color:visited { 16334 .has-blue-color:visited {
16328 color: #0d6efd; 16335 color: #0d6efd;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -49,7 +49,7 @@ function create_posttype() { ...@@ -49,7 +49,7 @@ function create_posttype() {
49 'name' => __( 'Resources' ), 49 'name' => __( 'Resources' ),
50 'singular_name' => __( 'resource' ) 50 'singular_name' => __( 'resource' )
51 ), 51 ),
52 'menu_icon' => 'dashicons-info', 52 'menu_icon' => 'dashicons-clipboard',
53 'public' => true, 53 'public' => true,
54 'has_archive' => false, 54 'has_archive' => false,
55 'rewrite' => array('slug' => 'resource', 'with_front'=>false), 55 'rewrite' => array('slug' => 'resource', 'with_front'=>false),
......
...@@ -72,3 +72,13 @@ function the_bread() { ...@@ -72,3 +72,13 @@ function the_bread() {
72 72
73 }; 73 };
74 74
75
76 add_filter( 'woocommerce_account_menu_items', 'misha_rename_downloads' );
77
78 function misha_rename_downloads( $menu_links ){
79
80 // $menu_links[ 'TAB ID HERE' ] = 'NEW TAB NAME HERE';
81 $menu_links[ 'dashboard' ] = 'My Account';
82
83 return $menu_links;
84 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -56,3 +56,52 @@ add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2); ...@@ -56,3 +56,52 @@ add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
56 56
57 return $items; 57 return $items;
58 } 58 }
59 // Add to existing function.php file
60 // Disable support for comments and trackbacks in post types
61 function df_disable_comments_post_types_support() {
62 $post_types = get_post_types();
63 foreach ($post_types as $post_type) {
64 if(post_type_supports($post_type, 'comments')) {
65 remove_post_type_support($post_type, 'comments');
66 remove_post_type_support($post_type, 'trackbacks');
67 }
68 }
69 }
70 add_action('admin_init', 'df_disable_comments_post_types_support');
71 // Close comments on the front-end
72 function df_disable_comments_status() {
73 return false;
74 }
75 add_filter('comments_open', 'df_disable_comments_status', 20, 2);
76 add_filter('pings_open', 'df_disable_comments_status', 20, 2);
77 // Hide existing comments
78 function df_disable_comments_hide_existing_comments($comments) {
79 $comments = array();
80 return $comments;
81 }
82 add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);
83 // Remove comments page in menu
84 function df_disable_comments_admin_menu() {
85 remove_menu_page('edit-comments.php');
86 }
87 add_action('admin_menu', 'df_disable_comments_admin_menu');
88 // Redirect any user trying to access comments page
89 function df_disable_comments_admin_menu_redirect() {
90 global $pagenow;
91 if ($pagenow === 'edit-comments.php') {
92 wp_redirect(admin_url()); exit;
93 }
94 }
95 add_action('admin_init', 'df_disable_comments_admin_menu_redirect');
96 // Remove comments metabox from dashboard
97 function df_disable_comments_dashboard() {
98 remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
99 }
100 add_action('admin_init', 'df_disable_comments_dashboard');
101 // Remove comments links from admin bar
102 function df_disable_comments_admin_bar() {
103 if (is_admin_bar_showing()) {
104 remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
105 }
106 }
107 add_action('init', 'df_disable_comments_admin_bar');
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -45,7 +45,7 @@ li.crumb a { ...@@ -45,7 +45,7 @@ li.crumb a {
45 color: #2c2c2c !important; 45 color: #2c2c2c !important;
46 background-color: #fff !important; 46 background-color: #fff !important;
47 } 47 }
48 48 .woocommerce-page,
49 .woocommerce-input-wrapper{ 49 .woocommerce-input-wrapper{
50 .select2-container--default .select2-selection--single, 50 .select2-container--default .select2-selection--single,
51 select, 51 select,
...@@ -59,3 +59,11 @@ li.crumb a { ...@@ -59,3 +59,11 @@ li.crumb a {
59 .return-to-shop{ 59 .return-to-shop{
60 display: none !important; 60 display: none !important;
61 } 61 }
62
63 .woocommerce-orders{
64 .woocommerce-message{
65 .woocommerce-Button{
66 display:none !important;
67 }
68 }
69 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 Author: Tenzing Communications 5 Author: Tenzing Communications
6 Author URI: https://tenzingbrand.com 6 Author URI: https://tenzingbrand.com
7 Template: understrap 7 Template: understrap
8 Version: 1.1.0 8 Version: 1.1.1
9 License: GNU General Public License v2 or later 9 License: GNU General Public License v2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 Text Domain: understrap-child 11 Text Domain: understrap-child
......
1 <?php
2 /**
3 * Empty cart page
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-empty.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 /*
21 * @hooked wc_empty_cart_message - 10
22 */
23 do_action( 'woocommerce_cart_is_empty' );
24
25 if ( wc_get_page_id( 'shop' ) > 0 ) :
26 ?>
27 <p class="return-to-shop">
28 <a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
29 <?php
30 /**
31 * Filter "Return To Shop" text.
32 *
33 * @since 4.6.0
34 * @param string $default_text Default text.
35 */
36 echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', __( 'Return to shop', 'woocommerce' ) ) );
37 ?>
38 </a>
39 </p>
40 <?php
41 endif;
42
1 <?php
2 /**
3 * Cart Page
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_before_cart' ); ?>
21
22 <form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
23 <?php do_action( 'woocommerce_before_cart_table' ); ?>
24
25 <table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
26 <thead>
27 <tr>
28 <th class="product-remove"><span class="screen-reader-text"><?php esc_html_e( 'Remove item', 'woocommerce' ); ?></span></th>
29 <th class="product-thumbnail"><span class="screen-reader-text"><?php esc_html_e( 'Thumbnail image', 'woocommerce' ); ?></span></th>
30 <th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
31 <th class="product-price"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
32 <th class="product-quantity"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
33 <th class="product-subtotal"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
34 </tr>
35 </thead>
36 <tbody>
37 <?php do_action( 'woocommerce_before_cart_contents' ); ?>
38
39 <?php
40 foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
41 $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
42 $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
43
44 if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
45 $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
46 ?>
47 <tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
48
49 <td class="product-remove">
50 <?php
51 echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
52 'woocommerce_cart_item_remove_link',
53 sprintf(
54 '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
55 esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
56 esc_html__( 'Remove this item', 'woocommerce' ),
57 esc_attr( $product_id ),
58 esc_attr( $_product->get_sku() )
59 ),
60 $cart_item_key
61 );
62 ?>
63 </td>
64
65 <td class="product-thumbnail">
66 <?php
67 $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
68
69 if ( ! $product_permalink ) {
70 echo $thumbnail; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
71 } else {
72 printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
73 }
74 ?>
75 </td>
76
77 <td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
78 <?php
79 if ( ! $product_permalink ) {
80 echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) . '&nbsp;' );
81 } else {
82 echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
83 }
84
85 do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
86
87 // Meta data.
88 echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
89
90 // Backorder notification.
91 if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
92 echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ) );
93 }
94 ?>
95 </td>
96
97 <td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
98 <?php
99 echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
100 ?>
101 </td>
102
103 <td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
104 <?php
105 if ( $_product->is_sold_individually() ) {
106 $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
107 } else {
108 $product_quantity = woocommerce_quantity_input(
109 array(
110 'input_name' => "cart[{$cart_item_key}][qty]",
111 'input_value' => $cart_item['quantity'],
112 'max_value' => $_product->get_max_purchase_quantity(),
113 'min_value' => '0',
114 'product_name' => $_product->get_name(),
115 ),
116 $_product,
117 false
118 );
119 }
120
121 echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
122 ?>
123 </td>
124
125 <td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
126 <?php
127 echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
128 ?>
129 </td>
130 </tr>
131 <?php
132 }
133 }
134 ?>
135
136 <?php do_action( 'woocommerce_cart_contents' ); ?>
137
138 <tr>
139 <td colspan="6" class="actions">
140
141 <?php if ( wc_coupons_enabled() ) { ?>
142 <div class="coupon">
143 <label for="coupon_code"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text form-control" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <button type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?></button>
144 <?php do_action( 'woocommerce_cart_coupon' ); ?>
145 </div>
146 <?php } ?>
147
148 <button type="submit" class="btn btn-outline-primary" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
149
150 <?php do_action( 'woocommerce_cart_actions' ); ?>
151
152 <?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
153 </td>
154 </tr>
155
156 <?php do_action( 'woocommerce_after_cart_contents' ); ?>
157 </tbody>
158 </table>
159 <?php do_action( 'woocommerce_after_cart_table' ); ?>
160 </form>
161
162 <?php do_action( 'woocommerce_before_cart_collaterals' ); ?>
163
164 <div class="cart-collaterals">
165 <?php
166 /**
167 * Cart collaterals hook.
168 *
169 * @hooked woocommerce_cross_sell_display
170 * @hooked woocommerce_cart_totals - 10
171 */
172 do_action( 'woocommerce_cart_collaterals' );
173 ?>
174 </div>
175
176 <?php do_action( 'woocommerce_after_cart' ); ?>
1 <?php
2 /**
3 * Proceed to checkout button
4 *
5 * Contains the markup for the proceed to checkout button on the cart.
6 *
7 * This template can be overridden by copying it to yourtheme/woocommerce/cart/proceed-to-checkout-button.php.
8 *
9 * HOWEVER, on occasion WooCommerce will need to update template files and you
10 * (the theme developer) will need to copy the new files to your theme to
11 * maintain compatibility. We try to do this as little as possible, but it does
12 * happen. When this occurs the version of the template file will be bumped and
13 * the readme will list any important changes.
14 *
15 * @see https://docs.woocommerce.com/document/template-structure/
16 * @package WooCommerce\Templates
17 * @version 7.0.1
18 */
19
20 // Exit if accessed directly.
21 defined( 'ABSPATH' ) || exit;
22 ?>
23
24 <a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="btn btn-primary btn-lg btn-block">
25 <?php esc_html_e( 'Proceed to checkout', 'woocommerce' ); ?>
26 </a>
1 <?php
2 /**
3 * Checkout Form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 3.5.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 do_action( 'woocommerce_before_checkout_form', $checkout );
23
24 // If checkout registration is disabled and not logged in, the user cannot checkout.
25 if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
26 echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) );
27 return;
28 }
29
30 ?>
31
32 <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
33
34 <?php if ( $checkout->get_checkout_fields() ) : ?>
35
36 <?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
37
38 <div class="row" id="customer_details">
39 <div class="col-12 col-sm-7">
40 <?php do_action( 'woocommerce_checkout_billing' ); ?>
41 </div>
42
43 <div class="col-12 col-sm-5">
44 <?php do_action( 'woocommerce_checkout_shipping' ); ?>
45 </div>
46 </div>
47
48 <?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
49
50 <?php endif; ?>
51
52 <?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
53
54 <h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
55
56 <?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
57
58 <div id="order_review" class="woocommerce-checkout-review-order">
59 <?php do_action( 'woocommerce_checkout_order_review' ); ?>
60 </div>
61
62 <?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
63
64 </form>
65
66 <?php
67 do_action( 'woocommerce_after_checkout_form', $checkout );
1 <?php
2 /**
3 * Checkout coupon form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine.
21 return;
22 }
23
24 ?>
25 <div class="woocommerce-form-coupon-toggle">
26 <?php wc_print_notice( apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '</a>' ), 'notice' ); ?>
27 </div>
28
29 <form class="checkout_coupon woocommerce-form-coupon" method="post" style="display:none">
30
31 <p><?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?></p>
32
33 <p class="form-row form-row-first">
34 <label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label>
35 <input type="text" name="coupon_code" class="form-control" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />
36 </p>
37
38 <p class="form-row form-row-last">
39 <button type="submit" class="btn btn-outline-primary" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
40 </p>
41
42 <div class="clear"></div>
43 </form>
1 <?php
2 /**
3 * Pay for order form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-pay.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 $totals = $order->get_order_item_totals(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
21 ?>
22 <form id="order_review" method="post">
23
24 <table class="shop_table">
25 <thead>
26 <tr>
27 <th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
28 <th class="product-quantity"><?php esc_html_e( 'Qty', 'woocommerce' ); ?></th>
29 <th class="product-total"><?php esc_html_e( 'Totals', 'woocommerce' ); ?></th>
30 </tr>
31 </thead>
32 <tbody>
33 <?php if ( count( $order->get_items() ) > 0 ) : ?>
34 <?php foreach ( $order->get_items() as $item_id => $item ) : ?>
35 <?php
36 if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
37 continue;
38 }
39 ?>
40 <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
41 <td class="product-name">
42 <?php
43 echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
44
45 do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false );
46
47 wc_display_item_meta( $item );
48
49 do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false );
50 ?>
51 </td>
52 <td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '&times;&nbsp;%s', esc_html( $item->get_quantity() ) ) . '</strong>', $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
53 <td class="product-subtotal"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
54 </tr>
55 <?php endforeach; ?>
56 <?php endif; ?>
57 </tbody>
58 <tfoot>
59 <?php if ( $totals ) : ?>
60 <?php foreach ( $totals as $total ) : ?>
61 <tr>
62 <th scope="row" colspan="2"><?php echo $total['label']; ?></th><?php // @codingStandardsIgnoreLine ?>
63 <td class="product-total"><?php echo $total['value']; ?></td><?php // @codingStandardsIgnoreLine ?>
64 </tr>
65 <?php endforeach; ?>
66 <?php endif; ?>
67 </tfoot>
68 </table>
69
70 <div id="payment">
71 <?php if ( $order->needs_payment() ) : ?>
72 <ul class="wc_payment_methods payment_methods methods">
73 <?php
74 if ( ! empty( $available_gateways ) ) {
75 foreach ( $available_gateways as $gateway ) {
76 wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
77 }
78 } else {
79 echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', esc_html__( '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>'; // @codingStandardsIgnoreLine
80 }
81 ?>
82 </ul>
83 <?php endif; ?>
84 <div class="form-row">
85 <input type="hidden" name="woocommerce_pay" value="1" />
86
87 <?php wc_get_template( 'checkout/terms.php' ); ?>
88
89 <?php do_action( 'woocommerce_pay_order_before_submit' ); ?>
90
91 <?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 ?>
92
93 <?php do_action( 'woocommerce_pay_order_after_submit' ); ?>
94
95 <?php wp_nonce_field( 'woocommerce-pay', 'woocommerce-pay-nonce' ); ?>
96 </div>
97 </div>
98 </form>
1 <?php
2 /**
3 * Checkout Payment Section
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/payment.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 if ( ! wp_doing_ajax() ) {
21 do_action( 'woocommerce_review_order_before_payment' );
22 }
23 ?>
24 <div id="payment" class="woocommerce-checkout-payment">
25 <?php if ( WC()->cart->needs_payment() ) : ?>
26 <ul class="wc_payment_methods payment_methods methods">
27 <?php
28 if ( ! empty( $available_gateways ) ) {
29 foreach ( $available_gateways as $gateway ) {
30 wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
31 }
32 } else {
33 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.', 'woocommerce' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '</li>'; // @codingStandardsIgnoreLine
34 }
35 ?>
36 </ul>
37 <?php endif; ?>
38 <div class="form-row place-order">
39 <noscript>
40 <?php
41 /* translators: $1 and $2 opening and closing emphasis tags respectively */
42 printf( esc_html__( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the %1$sUpdate Totals%2$s button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ), '<em>', '</em>' );
43 ?>
44 <br/><button type="submit" class="btn btn-primary" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce' ); ?></button>
45 </noscript>
46
47 <?php wc_get_template( 'checkout/terms.php' ); ?>
48
49 <?php do_action( 'woocommerce_review_order_before_submit' ); ?>
50
51 <?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 ?>
52
53 <?php do_action( 'woocommerce_review_order_after_submit' ); ?>
54
55 <?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
56 </div>
57 </div>
58 <?php
59 if ( ! wp_doing_ajax() ) {
60 do_action( 'woocommerce_review_order_after_payment' );
61 }
1 <?php
2 /**
3 * Login form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/global/form-login.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.1.0
16 */
17
18 // Exit if accessed directly.
19 defined( 'ABSPATH' ) || exit;
20
21 if ( is_user_logged_in() ) {
22 return;
23 }
24
25 ?>
26 <form class="woocommerce-form woocommerce-form-login login" method="post" <?php echo ( $hidden ) ? 'style="display:none;"' : ''; ?>>
27
28 <?php do_action( 'woocommerce_login_form_start' ); ?>
29
30 <?php echo ( $message ) ? wpautop( wptexturize( $message ) ) : ''; // @codingStandardsIgnoreLine ?>
31
32 <p class="form-row form-row-first">
33 <label for="username"><?php esc_html_e( 'Username or email', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
34 <input type="text" class="input-text form-control" name="username" id="username" autocomplete="username" />
35 </p>
36 <p class="form-row form-row-last">
37 <label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
38 <input class="input-text woocommerce-Input form-control" type="password" name="password" id="password" autocomplete="current-password" />
39 </p>
40 <div class="clear"></div>
41
42 <?php do_action( 'woocommerce_login_form' ); ?>
43
44 <p class="form-row">
45 <label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme">
46 <input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
47 </label>
48 <?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
49 <input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ); ?>" />
50 <button type="submit" class="btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Login', 'woocommerce' ); ?>"><?php esc_html_e( 'Login', 'woocommerce' ); ?></button>
51 </p>
52 <p class="lost_password">
53 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
54 </p>
55
56 <div class="clear"></div>
57
58 <?php do_action( 'woocommerce_login_form_end' ); ?>
59
60 </form>
1 <?php
2 /**
3 * Show options for ordering
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/loop/orderby.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 3.6.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 ?>
23 <form class="woocommerce-ordering" method="get">
24 <select name="orderby" class="orderby custom-select form-select" aria-label="<?php esc_attr_e( 'Shop order', 'woocommerce' ); ?>">
25 <?php foreach ( $catalog_orderby_options as $option_id => $name ) : ?>
26 <option value="<?php echo esc_attr( $option_id ); ?>" <?php selected( $orderby, $option_id ); ?>><?php echo esc_html( $name ); ?></option>
27 <?php endforeach; ?>
28 </select>
29 <input type="hidden" name="paged" value="1" />
30 <?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
31 </form>
1 <?php
2 /**
3 * Downloads
4 *
5 * Shows downloads on the account page.
6 *
7 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/downloads.php.
8 *
9 * HOWEVER, on occasion WooCommerce will need to update template files and you
10 * (the theme developer) will need to copy the new files to your theme to
11 * maintain compatibility. We try to do this as little as possible, but it does
12 * happen. When this occurs the version of the template file will be bumped and
13 * the readme will list any important changes.
14 *
15 * @see https://docs.woocommerce.com/document/template-structure/
16 * @package WooCommerce\Templates
17 * @version 3.2.0
18 */
19
20 if ( ! defined( 'ABSPATH' ) ) {
21 exit;
22 }
23
24 $downloads = WC()->customer->get_downloadable_products();
25 $has_downloads = (bool) $downloads;
26
27 do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
28
29 <?php if ( $has_downloads ) : ?>
30
31 <?php do_action( 'woocommerce_before_available_downloads' ); ?>
32
33 <?php do_action( 'woocommerce_available_downloads', $downloads ); ?>
34
35 <?php do_action( 'woocommerce_after_available_downloads' ); ?>
36
37 <?php else : ?>
38 <div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
39 <a class="btn btn-outline-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
40 <?php esc_html_e( 'Browse products', 'woocommerce' ); ?>
41 </a>
42 <?php esc_html_e( 'No downloads available yet.', 'woocommerce' ); ?>
43 </div>
44 <?php endif; ?>
45
46 <?php
47 do_action( 'woocommerce_after_account_downloads', $has_downloads );
1 <?php
2 /**
3 * Edit account form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-account.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_before_edit_account_form' ); ?>
21
22 <form class="woocommerce-EditAccountForm edit-account" action="" method="post" <?php do_action( 'woocommerce_edit_account_form_tag' ); ?> >
23
24 <?php do_action( 'woocommerce_edit_account_form_start' ); ?>
25
26 <p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
27 <label for="account_first_name"><?php esc_html_e( 'First name', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
28 <input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_first_name" id="account_first_name" autocomplete="given-name" value="<?php echo esc_attr( $user->first_name ); ?>" />
29 </p>
30 <p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
31 <label for="account_last_name"><?php esc_html_e( 'Last name', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
32 <input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_last_name" id="account_last_name" autocomplete="family-name" value="<?php echo esc_attr( $user->last_name ); ?>" />
33 </p>
34 <div class="clear"></div>
35
36 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
37 <label for="account_display_name"><?php esc_html_e( 'Display name', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
38 <input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="account_display_name" id="account_display_name" value="<?php echo esc_attr( $user->display_name ); ?>" /> <span><em><?php esc_html_e( 'This will be how your name will be displayed in the account section and in reviews', 'woocommerce' ); ?></em></span>
39 </p>
40 <div class="clear"></div>
41
42 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
43 <label for="account_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
44 <input type="email" class="woocommerce-Input woocommerce-Input--email input-text form-control" name="account_email" id="account_email" autocomplete="email" value="<?php echo esc_attr( $user->user_email ); ?>" />
45 </p>
46
47 <fieldset>
48 <legend><?php esc_html_e( 'Password change', 'woocommerce' ); ?></legend>
49
50 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide input-group">
51 <label for="password_current"><?php esc_html_e( 'Current password (leave blank to leave unchanged)', 'woocommerce' ); ?></label>
52 <input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_current" id="password_current" autocomplete="off" />
53 </p>
54 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
55 <label for="password_1"><?php esc_html_e( 'New password (leave blank to leave unchanged)', 'woocommerce' ); ?></label>
56 <input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_1" id="password_1" autocomplete="off" />
57 </p>
58 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
59 <label for="password_2"><?php esc_html_e( 'Confirm new password', 'woocommerce' ); ?></label>
60 <input type="password" class="woocommerce-Input woocommerce-Input--password input-text form-control" name="password_2" id="password_2" autocomplete="off" />
61 </p>
62 </fieldset>
63 <div class="clear"></div>
64
65 <?php do_action( 'woocommerce_edit_account_form' ); ?>
66
67 <p>
68 <?php wp_nonce_field( 'save_account_details', 'save-account-details-nonce' ); ?>
69 <button type="submit" class="btn btn-outline-primary" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
70 <input type="hidden" name="action" value="save_account_details" />
71 </p>
72
73 <?php do_action( 'woocommerce_edit_account_form_end' ); ?>
74 </form>
75
76 <?php
77 do_action( 'woocommerce_after_edit_account_form' );
1 <?php
2 /**
3 * Edit address form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-address.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 $page_title = ( 'billing' === $load_address ) ? esc_html__( 'Billing address', 'woocommerce' ) : esc_html__( 'Shipping address', 'woocommerce' );
21
22 do_action( 'woocommerce_before_edit_account_address_form' ); ?>
23
24 <?php if ( ! $load_address ) : ?>
25 <?php wc_get_template( 'myaccount/my-address.php' ); ?>
26 <?php else : ?>
27
28 <form method="post">
29
30 <h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3><?php // @codingStandardsIgnoreLine ?>
31
32 <div class="woocommerce-address-fields">
33 <?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
34
35 <div class="woocommerce-address-fields__field-wrapper">
36 <?php
37 foreach ( $address as $key => $field ) {
38 woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
39 }
40 ?>
41 </div>
42
43 <?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>
44
45 <p>
46 <button type="submit" class="btn btn-outline-primary" name="save_address" value="<?php esc_attr_e( 'Save address', 'woocommerce' ); ?>"><?php esc_html_e( 'Save address', 'woocommerce' ); ?></button>
47 <?php wp_nonce_field( 'woocommerce-edit_address', 'woocommerce-edit-address-nonce' ); ?>
48 <input type="hidden" name="action" value="edit_address" />
49 </p>
50 </div>
51
52 </form>
53
54 <?php endif; ?>
55
56 <?php
57 do_action( 'woocommerce_after_edit_account_address_form' );
1 <?php
2 /**
3 * Login Form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit; // Exit if accessed directly.
20 }
21
22 do_action( 'woocommerce_before_customer_login_form' );
23
24 $col = 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ? 6 : 12;
25 ?>
26
27 <div class="u-columns col2-set row" id="customer_login">
28
29 <div class="u-column1 col-md-<?php echo (int) $col; ?>">
30
31 <h2><?php esc_html_e( 'Login', 'woocommerce' ); ?></h2>
32
33 <form class="woocommerce-form woocommerce-form-login login" method="post">
34
35 <?php do_action( 'woocommerce_login_form_start' ); ?>
36
37 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
38 <label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
39 <input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
40 </p>
41 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
42 <label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
43 <input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="password" name="password" id="password" autocomplete="current-password" />
44 </p>
45
46 <?php do_action( 'woocommerce_login_form' ); ?>
47
48 <p class="form-row">
49 <label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme w-100">
50 <input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'woocommerce' ); ?></span>
51 </label>
52 <?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
53 <button type="submit" class="woocommerce-form-login__submit btn btn-outline-primary" name="login" value="<?php esc_attr_e( 'Log in', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
54 </p>
55 <p class="woocommerce-LostPassword lost_password">
56 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
57 </p>
58
59 <?php do_action( 'woocommerce_login_form_end' ); ?>
60
61 </form>
62
63 <?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
64
65 </div>
66
67 <div class="u-column2 col-md-6">
68
69 <h2><?php esc_html_e( 'Register', 'woocommerce' ); ?></h2>
70
71 <form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?> >
72
73 <?php do_action( 'woocommerce_register_form_start' ); ?>
74
75 <?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
76
77 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
78 <label for="reg_username"><?php esc_html_e( 'Username', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
79 <input type="text" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
80 </p>
81
82 <?php endif; ?>
83
84 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
85 <label for="reg_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
86 <input type="email" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
87 </p>
88
89 <?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
90
91 <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
92 <label for="reg_password"><?php esc_html_e( 'Password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
93 <input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password" id="reg_password" autocomplete="new-password" />
94 </p>
95
96 <?php else : ?>
97
98 <p><?php esc_html_e( 'A link to set a new password will be sent to your email address.', 'woocommerce' ); ?></p>
99
100 <?php endif; ?>
101
102 <?php do_action( 'woocommerce_register_form' ); ?>
103
104 <p class="woocommerce-form-row form-row">
105 <?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
106 <button type="submit" class="woocommerce-form-register__submit btn btn-outline-primary" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button>
107 </p>
108
109 <?php do_action( 'woocommerce_register_form_end' ); ?>
110
111 </form>
112
113 </div>
114
115 </div>
116 <?php endif; ?>
117
118 <?php
119 do_action( 'woocommerce_after_customer_login_form' );
1 <?php
2 /**
3 * Lost password form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-lost-password.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_before_lost_password_form' );
21 ?>
22
23 <form method="post" class="woocommerce-ResetPassword lost_reset_password">
24
25 <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.', 'woocommerce' ) ); ?></p><?php // @codingStandardsIgnoreLine ?>
26
27 <p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
28 <label for="user_login"><?php esc_html_e( 'Username or email', 'woocommerce' ); ?></label>
29 <input class="woocommerce-Input woocommerce-Input--text input-text form-control" type="text" name="user_login" id="user_login" autocomplete="username" />
30 </p>
31
32 <div class="clear"></div>
33
34 <?php do_action( 'woocommerce_lostpassword_form' ); ?>
35
36 <p class="woocommerce-form-row form-row">
37 <input type="hidden" name="wc_reset_password" value="true" />
38 <button type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Reset password', 'woocommerce' ); ?>"><?php esc_html_e( 'Reset password', 'woocommerce' ); ?></button>
39 </p>
40
41 <?php wp_nonce_field( 'lost_password', 'woocommerce-lost-password-nonce' ); ?>
42
43 </form>
44 <?php
45 do_action( 'woocommerce_after_lost_password_form' );
1 <?php
2 /**
3 * Lost password reset form.
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-reset-password.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_before_reset_password_form' );
21 ?>
22
23 <form method="post" class="woocommerce-ResetPassword lost_reset_password">
24
25 <p><?php echo apply_filters( 'woocommerce_reset_password_message', esc_html__( 'Enter a new password below.', 'woocommerce' ) ); ?></p><?php // @codingStandardsIgnoreLine ?>
26
27 <p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
28 <label for="password_1"><?php esc_html_e( 'New password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
29 <input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password_1" id="password_1" autocomplete="new-password" />
30 </p>
31 <p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
32 <label for="password_2"><?php esc_html_e( 'Re-enter new password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
33 <input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password_2" id="password_2" autocomplete="new-password" />
34 </p>
35
36 <input type="hidden" name="reset_key" value="<?php echo esc_attr( $args['key'] ); ?>" />
37 <input type="hidden" name="reset_login" value="<?php echo esc_attr( $args['login'] ); ?>" />
38
39 <div class="clear"></div>
40
41 <?php do_action( 'woocommerce_resetpassword_form' ); ?>
42
43 <p class="woocommerce-form-row form-row">
44 <input type="hidden" name="wc_reset_password" value="true" />
45 <button type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Save', 'woocommerce' ); ?>"><?php esc_html_e( 'Save', 'woocommerce' ); ?></button>
46 </p>
47
48 <?php wp_nonce_field( 'reset_password', 'woocommerce-reset-password-nonce' ); ?>
49
50 </form>
51 <?php
52 do_action( 'woocommerce_after_reset_password_form' );
1 <?php
2 /**
3 * My Addresses
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-address.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 2.6.0
16 */
17
18 // Exit if accessed directly.
19 defined( 'ABSPATH' ) || exit;
20
21 $customer_id = get_current_user_id();
22
23 if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
24 $get_addresses = apply_filters(
25 'woocommerce_my_account_get_addresses',
26 array(
27 'billing' => __( 'Billing address', 'woocommerce' ),
28 'shipping' => __( 'Shipping address', 'woocommerce' ),
29 ),
30 $customer_id
31 );
32 } else {
33 $get_addresses = apply_filters(
34 'woocommerce_my_account_get_addresses',
35 array(
36 'billing' => __( 'Billing address', 'woocommerce' ),
37 ),
38 $customer_id
39 );
40 }
41
42 $oldcol = 1;
43 $col = 1;
44 ?>
45
46 <p>
47 <?php echo apply_filters( 'woocommerce_my_account_my_address_description', esc_html__( 'The following addresses will be used on the checkout page by default.', 'woocommerce' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
48 </p>
49
50 <?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) : ?>
51 <div class="u-columns woocommerce-Addresses col2-set addresses">
52 <?php endif; ?>
53
54 <?php foreach ( $get_addresses as $name => $address_title ) : ?>
55
56 <?php $address = wc_get_account_formatted_address( $name ); ?>
57
58 <div class="u-column woocommerce-Address">
59 <header class="woocommerce-Address-title title">
60 <h3><?php echo esc_html( $address_title ); ?></h3>
61 <a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php echo $address ? esc_html__( 'Edit', 'woocommerce' ) : esc_html__( 'Add', 'woocommerce' ); ?></a>
62 </header>
63 <address>
64 <?php
65 echo $address ? wp_kses_post( $address ) : esc_html_e( 'You have not set up this type of address yet.', 'woocommerce' );
66 ?>
67 </address>
68 </div>
69
70 <?php endforeach; ?>
71
72 <?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) : ?>
73 </div>
74 <?php
75 endif;
1 <?php
2 /**
3 * My Orders - Deprecated
4 *
5 * @deprecated 2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
6 * @package WooCommerce\Templates
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 $my_orders_columns = apply_filters(
12 'woocommerce_my_account_my_orders_columns',
13 array(
14 'order-number' => esc_html__( 'Order', 'woocommerce' ),
15 'order-date' => esc_html__( 'Date', 'woocommerce' ),
16 'order-status' => esc_html__( 'Status', 'woocommerce' ),
17 'order-total' => esc_html__( 'Total', 'woocommerce' ),
18 'order-actions' => '&nbsp;',
19 )
20 );
21
22 $customer_orders = get_posts(
23 apply_filters(
24 'woocommerce_my_account_my_orders_query',
25 array(
26 'numberposts' => $order_count,
27 'meta_key' => '_customer_user', // phpcs:ignore WordPress.DB.SlowDBQuery
28 'meta_value' => get_current_user_id(), // phpcs:ignore WordPress.DB.SlowDBQuery
29 'post_type' => wc_get_order_types( 'view-orders' ),
30 'post_status' => array_keys( wc_get_order_statuses() ),
31 )
32 )
33 );
34
35 if ( $customer_orders ) : ?>
36
37 <h2><?php echo apply_filters( 'woocommerce_my_account_my_orders_title', esc_html__( 'Recent orders', 'woocommerce' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></h2>
38
39 <table class="shop_table shop_table_responsive my_account_orders table-hover table-striped">
40
41 <thead>
42 <tr>
43 <?php foreach ( $my_orders_columns as $column_id => $column_name ) : ?>
44 <th class="<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
45 <?php endforeach; ?>
46 </tr>
47 </thead>
48
49 <tbody>
50 <?php
51 foreach ( $customer_orders as $customer_order ) :
52 $order = wc_get_order( $customer_order ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
53 $item_count = $order->get_item_count();
54 ?>
55 <tr class="order">
56 <?php foreach ( $my_orders_columns as $column_id => $column_name ) : ?>
57 <td class="<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
58 <?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?>
59 <?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?>
60
61 <?php elseif ( 'order-number' === $column_id ) : ?>
62 <a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
63 <?php echo _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
64 </a>
65
66 <?php elseif ( 'order-date' === $column_id ) : ?>
67 <time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time>
68
69 <?php elseif ( 'order-status' === $column_id ) : ?>
70 <?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?>
71
72 <?php elseif ( 'order-total' === $column_id ) : ?>
73 <?php
74 /* translators: 1: formatted order total 2: total order items */
75 printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
76 ?>
77
78 <?php elseif ( 'order-actions' === $column_id ) : ?>
79 <?php
80 $actions = wc_get_account_orders_actions( $order );
81
82 if ( ! empty( $actions ) ) {
83 foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
84 echo '<a href="' . esc_url( $action['url'] ) . '" class=""btn btn-outline-primary ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
85 }
86 }
87 ?>
88 <?php endif; ?>
89 </td>
90 <?php endforeach; ?>
91 </tr>
92 <?php endforeach; ?>
93 </tbody>
94 </table>
95 <?php
96 endif;
1 <?php
2 /**
3 * My Account navigation
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/navigation.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 2.6.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 do_action( 'woocommerce_before_account_navigation' );
23 ?>
24
25 <nav class="woocommerce-MyAccount-navigation">
26 <div class="list-group">
27 <?php
28 foreach ( wc_get_account_menu_items() as $endpoint => $label ) {
29 printf(
30 '<a href="%s" class="%s">%s</a>',
31 esc_url( wc_get_account_endpoint_url( $endpoint ) ),
32 wc_get_account_menu_item_classes( $endpoint ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Ok.
33 esc_html( $label )
34 );
35 }
36 ?>
37 </div>
38 </nav>
39
40 <?php
41 do_action( 'woocommerce_after_account_navigation' );
1 <?php
2 /**
3 * Orders
4 *
5 * Shows orders on the account page.
6 *
7 * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/orders.php.
8 *
9 * HOWEVER, on occasion WooCommerce will need to update template files and you
10 * (the theme developer) will need to copy the new files to your theme to
11 * maintain compatibility. We try to do this as little as possible, but it does
12 * happen. When this occurs the version of the template file will be bumped and
13 * the readme will list any important changes.
14 *
15 * @see https://docs.woocommerce.com/document/template-structure/
16 * @package WooCommerce\Templates
17 * @version 7.0.1
18 */
19
20 defined( 'ABSPATH' ) || exit;
21
22 do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
23
24 <?php if ( $has_orders ) : ?>
25
26 <table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">
27 <thead>
28 <tr>
29 <?php foreach ( wc_get_account_orders_columns() as $column_id => $column_name ) : ?>
30 <th class="woocommerce-orders-table__header woocommerce-orders-table__header-<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
31 <?php endforeach; ?>
32 </tr>
33 </thead>
34
35 <tbody>
36 <?php
37 foreach ( $customer_orders->orders as $customer_order ) {
38 $order = wc_get_order( $customer_order ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
39 $item_count = $order->get_item_count() - $order->get_item_count_refunded();
40 ?>
41 <tr class="woocommerce-orders-table__row woocommerce-orders-table__row--status-<?php echo esc_attr( $order->get_status() ); ?> order">
42 <?php foreach ( wc_get_account_orders_columns() as $column_id => $column_name ) : ?>
43 <td class="woocommerce-orders-table__cell woocommerce-orders-table__cell-<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
44 <?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?>
45 <?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?>
46
47 <?php elseif ( 'order-number' === $column_id ) : ?>
48 <a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
49 <?php echo esc_html( _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number() ); ?>
50 </a>
51
52 <?php elseif ( 'order-date' === $column_id ) : ?>
53 <time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time>
54
55 <?php elseif ( 'order-status' === $column_id ) : ?>
56 <?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?>
57
58 <?php elseif ( 'order-total' === $column_id ) : ?>
59 <?php
60 /* translators: 1: formatted order total 2: total order items */
61 echo wp_kses_post( sprintf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ) );
62 ?>
63
64 <?php elseif ( 'order-actions' === $column_id ) : ?>
65 <?php
66 $actions = wc_get_account_orders_actions( $order );
67
68 if ( ! empty( $actions ) ) {
69 foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
70 echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button btn btn-outline-primary ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
71 }
72 }
73 ?>
74 <?php endif; ?>
75 </td>
76 <?php endforeach; ?>
77 </tr>
78 <?php
79 }
80 ?>
81 </tbody>
82 </table>
83
84 <?php do_action( 'woocommerce_before_account_orders_pagination' ); ?>
85
86 <?php if ( 1 < $customer_orders->max_num_pages ) : ?>
87 <div class="woocommerce-pagination woocommerce-pagination--without-numbers woocommerce-Pagination">
88 <?php if ( 1 !== $current_page ) : ?>
89 <a class="woocommerce-button woocommerce-button--previous woocommerce-Button woocommerce-Button--previous btn btn-outline-primary" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page - 1 ) ); ?>"><?php esc_html_e( 'Previous', 'woocommerce' ); ?></a>
90 <?php endif; ?>
91
92 <?php if ( intval( $customer_orders->max_num_pages ) !== $current_page ) : ?>
93 <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 esc_html_e( 'Next', 'woocommerce' ); ?></a>
94 <?php endif; ?>
95 </div>
96 <?php endif; ?>
97
98 <?php else : ?>
99 <div class="woocommerce-message woocommerce-message--info woocommerce-Message woocommerce-Message--info woocommerce-info">
100 <a class="woocommerce-Button 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( 'Browse products', 'woocommerce' ); ?></a>
101 <?php esc_html_e( 'No order has been made yet.', 'woocommerce' ); ?>
102 </div>
103 <?php endif; ?>
104
105 <?php do_action( 'woocommerce_after_account_orders', $has_orders ); ?>
1 <?php
2 /**
3 * The template for displaying product search form
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/product-searchform.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 ?>
23 <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
24 <div class="input-group">
25 <input type="search" id="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>" class="search-field form-control" placeholder="<?php echo esc_attr__( 'Search products&hellip;', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
26 <label class="screen-reader-text" for="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>"><?php esc_html_e( 'Search for:', 'woocommerce' ); ?></label>
27 <input type="hidden" name="post_type" value="product" />
28 <div class="input-group-append">
29 <button class="btn btn-primary" type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>"><?php echo esc_html_x( 'Search', 'submit button', 'woocommerce' ); ?></button>
30 </div>
31 </div>
32 </form>
1 <?php
2 /**
3 * Simple product add to cart
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/single-product/add-to-cart/simple.php.
6 *
7 * HOWEVER, on occasion WooCommerce will need to update template files and you
8 * (the theme developer) will need to copy the new files to your theme to
9 * maintain compatibility. We try to do this as little as possible, but it does
10 * happen. When this occurs the version of the template file will be bumped and
11 * the readme will list any important changes.
12 *
13 * @see https://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates
15 * @version 7.0.1
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 global $product;
21
22 if ( ! $product->is_purchasable() ) {
23 return;
24 }
25
26 echo wc_get_stock_html( $product ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
27
28 if ( $product->is_in_stock() ) : ?>
29
30 <?php do_action( 'woocommerce_before_add_to_cart_form' ); ?>
31
32 <form class="cart" action="<?php echo esc_url( apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ) ); ?>" method="post" enctype='multipart/form-data'>
33 <?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
34
35 <?php
36 do_action( 'woocommerce_before_add_to_cart_quantity' );
37
38 woocommerce_quantity_input(
39 array(
40 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
41 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
42 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
43 )
44 );
45
46 do_action( 'woocommerce_after_add_to_cart_quantity' );
47 ?>
48
49 <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>
50
51 <?php do_action( 'woocommerce_after_add_to_cart_button' ); ?>
52 </form>
53
54 <?php do_action( 'woocommerce_after_add_to_cart_form' ); ?>
55
56 <?php
57 endif;
1 <?php
2 /**
3 * Single variation cart button
4 *
5 * @see https://docs.woocommerce.com/document/template-structure/
6 * @package WooCommerce\Templates
7 * @version 7.0.1
8 */
9
10 defined( 'ABSPATH' ) || exit;
11
12 global $product;
13 ?>
14 <div class="woocommerce-variation-add-to-cart variations_button">
15 <?php do_action( 'woocommerce_before_add_to_cart_button' ); ?>
16
17 <?php
18 do_action( 'woocommerce_before_add_to_cart_quantity' );
19
20 woocommerce_quantity_input(
21 array(
22 'min_value' => apply_filters( 'woocommerce_quantity_input_min', $product->get_min_purchase_quantity(), $product ),
23 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->get_max_purchase_quantity(), $product ),
24 'input_value' => isset( $_POST['quantity'] ) ? wc_stock_amount( wp_unslash( $_POST['quantity'] ) ) : $product->get_min_purchase_quantity(), // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
25 )
26 );
27
28 do_action( 'woocommerce_after_add_to_cart_quantity' );
29 ?>
30
31 <button type="submit" class="single_add_to_cart_button btn btn-primary"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
32
33 <?php do_action( 'woocommerce_after_add_to_cart_button' ); ?>
34
35 <input type="hidden" name="add-to-cart" value="<?php echo absint( $product->get_id() ); ?>" />
36 <input type="hidden" name="product_id" value="<?php echo absint( $product->get_id() ); ?>" />
37 <input type="hidden" name="variation_id" class="variation_id" value="0" />
38 </div>