Skip to content

Commit

Permalink
update woo templates (#128)
Browse files Browse the repository at this point in the history
* update woo templates

* fix $classes not defined

* fix missing icons
  • Loading branch information
jamesros161 authored Jul 23, 2024
1 parent 5bf3f25 commit bcc321f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 34 deletions.
34 changes: 11 additions & 23 deletions prime/woocommerce/archive-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
* 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/
* @package WooCommerce/Templates
* @version 3.4.0
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 8.6.0
*/

$has_header_template = apply_filters( 'crio_premium_get_page_header', get_the_ID() );
$has_header_template = get_the_ID() === $has_header_template ? false : $has_header_template;
$template_has_title = get_post_meta( $has_header_template, 'crio-premium-template-has-page-title', true );

defined( 'ABSPATH' ) || exit;

get_header( 'shop' );
Expand All @@ -32,23 +28,15 @@
*/
do_action( 'woocommerce_before_main_content' );

?>
<header class="woocommerce-products-header">
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) && ! $template_has_title ) : ?>
<<?php echo is_front_page() ? 'h2' : 'h1'; ?> class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
<?php endif; ?>
/**
* Hook: woocommerce_shop_loop_header.
*
* @since 8.6.0
*
* @hooked woocommerce_product_taxonomy_archive_header - 10
*/
do_action( 'woocommerce_shop_loop_header' );

<?php
/**
* Hook: woocommerce_archive_description.
*
* @hooked woocommerce_taxonomy_archive_description - 10
* @hooked woocommerce_product_archive_description - 10
*/
do_action( 'woocommerce_archive_description' );
?>
</header>
<?php
if ( woocommerce_product_loop() ) {

/**
Expand Down
21 changes: 18 additions & 3 deletions prime/woocommerce/myaccount/form-edit-account.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* 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/
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 7.0.1
* @version 8.7.0
*/

defined( 'ABSPATH' ) || exit;
Expand Down Expand Up @@ -44,6 +44,14 @@
<label for="account_email"><?php esc_html_e( 'Email address', 'crio' ); ?>&nbsp;<span class="required">*</span></label>
<input type="email" class="woocommerce-Input woocommerce-Input--email input-text form-control input-lg" name="account_email" id="account_email" autocomplete="email" value="<?php echo esc_attr( $user->user_email ); ?>" />
</p>
<?php
/**
* Hook where additional fields should be rendered.
*
* @since 8.7.0
*/
do_action( 'woocommerce_edit_account_form_fields' );
?>

<fieldset>
<legend class="h3"><?php esc_html_e( 'Password change', 'crio' ); ?></legend>
Expand All @@ -63,7 +71,14 @@
</fieldset>
<div class="clear"></div>

<?php do_action( 'woocommerce_edit_account_form' ); ?>
<?php
/**
* My Account edit account form.
*
* @since 2.6.0
*/
do_action( 'woocommerce_edit_account_form' );
?>

<p>
<?php wp_nonce_field( 'save_account_details', 'save-account-details-nonce' ); ?>
Expand Down
9 changes: 4 additions & 5 deletions prime/woocommerce/myaccount/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
* 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.6.0
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.0.0
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -23,7 +22,7 @@
do_action( 'woocommerce_before_account_navigation' );
?>

<nav class="woocommerce-MyAccount-navigation">
<nav class="woocommerce-MyAccount-navigation" aria-label="<?php esc_html_e( 'Account pages', 'crio' ); ?>">
<ul class="nav nav-pills nav-stacked">

<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
Expand Down
7 changes: 4 additions & 3 deletions prime/woocommerce/myaccount/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woo.com/document/template-structure/
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 8.5.0
* @version 9.1.0
*/

defined( 'ABSPATH' ) || exit;
Expand Down Expand Up @@ -45,7 +45,8 @@
<?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?>

<?php elseif ( 'order-number' === $column_id ) : ?>
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
<?php /* translators: %s: the order number, usually accompanied by a leading # */ ?>
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'View order number %s', 'crio' ), $order->get_order_number() ) ); ?>">
<?php echo esc_html( _x( '#', 'hash before order number', 'crio' ) . $order->get_order_number() ); ?>
</a>

Expand Down

0 comments on commit bcc321f

Please sign in to comment.