Skip to content

Commit

Permalink
Readme: update with shortcode params
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Sep 25, 2017
1 parent 1902857 commit 6441977
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Customize the admin scheme: https://gist.github.com/nicomollet/7fd3e2e5334ef352a

Shortcodes
-----------
[woocommerce_cart_link] Display a link to the Woocommerce cart
[woocommerce_cart_link] Display a link to the WooCommerce cart (params: `icon_class` `link_class` `show_amount` `show_count`)
[woocommerce_account_link] Display a link to the WooCommerce account page (params: `icon_class` `link_class`)

Major components
-----------
Expand Down
6 changes: 2 additions & 4 deletions inc/plugins/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function stormbringer_woocommerce_pages_menu_item_classes( $classes, $item, $arg


/**
* Woocommerce: Shortcode for displaying a link to basket
* Woocommerce: Shortcode [woocommerce_cart_link] for displaying a link to basket
*
* @param $atts
*
Expand All @@ -436,8 +436,6 @@ function woocommerce_cart_count_shortcode( $atts ) {

$defaults = array(
'icon_class' => 'glyphicon glyphicon-shopping-cart',
'empty_cart_text' => '',
'items_in_cart_text' => '',
'show_count' => true,
'show_amount' => true,
'link_class' => 'link-cart',
Expand Down Expand Up @@ -482,7 +480,7 @@ function woocommerce_cart_count_shortcode( $atts ) {
add_shortcode( 'woocommerce_cart_link', 'woocommerce_cart_count_shortcode' );

/**
* Shortcode for displaying a link to account
* WooCommerce: Shortcode [woocommerce_account_link] for displaying a link to account
*
* @param $atts
*
Expand Down

0 comments on commit 6441977

Please sign in to comment.