Move mini cart implementation example inside woocommerce.php

This commit is contained in:
Tiago Noronha 2017-08-07 00:06:52 +01:00
parent 579ad2eeea
commit d9ad954cdf
2 changed files with 15 additions and 9 deletions

View File

@ -8,14 +8,6 @@
* *
* @link https://developer.wordpress.org/themes/functionality/custom-headers/ * @link https://developer.wordpress.org/themes/functionality/custom-headers/
* *
* You can add the WooCommerce Mini Cart to header.php like so ...
*
<?php
if ( function_exists( '_s_woocommerce_header_cart' ) ) {
_s_woocommerce_header_cart();
}
?>
*
* @package _s * @package _s
*/ */

View File

@ -160,6 +160,20 @@ if ( ! function_exists( '_s_woocommerce_wrapper_after' ) ) {
} }
add_action( 'woocommerce_after_main_content', '_s_woocommerce_wrapper_after' ); add_action( 'woocommerce_after_main_content', '_s_woocommerce_wrapper_after' );
/**
* Sample implementation of the WooCommerce Mini Cart
*
* You can add the WooCommerce Mini Cart to header.php like so ...
*
<?php
if ( function_exists( '_s_woocommerce_header_cart' ) ) {
_s_woocommerce_header_cart();
}
?>
*
* @package _s
*/
if ( ! function_exists( '_s_woocommerce_cart_link_fragment' ) ) { if ( ! function_exists( '_s_woocommerce_cart_link_fragment' ) ) {
/** /**
* Cart Fragments * Cart Fragments