Genesis Connect for WooCommerce - Version 0.9.3

Version Description

  • Released 14 May 2012
  • taxonomy.php and archive-product.php now use woocommerce_get_template_part() instead of gencwooc_get_template_part()
  • gencwooc_get_template_part() updated to reflect latest version of woocommerce_get_template_part(). Note: gencwooc_get_template_part() will be deprecated in a future version and is only retained for backwards compatibility.
Download this release

Release Info

Developer studiograsshopper
Plugin Icon 128x128 Genesis Connect for WooCommerce
Version 0.9.3
Comparing to
See all releases

Code changes from version 0.9.4 to 0.9.3

genesis-connect-woocommerce.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Genesis Connect for WooCommerce
4
  Plugin URI: http://www.studiopress.com/plugins/genesis-connect-woocommerce
5
- Version: 0.9.4
6
  Author: StudioPress
7
  Author URI: http://www.studiopress.com/
8
  Description: Allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
@@ -23,7 +23,7 @@ register_activation_hook( __FILE__, 'gencwooc_activation' );
23
  * - Child theme needs to have add_theme_support( 'genesis-connect-woocommerce' ) in functions.php
24
  *
25
  * Note: register_activation_hook() isn't run after auto or manual upgrade, only on activation
26
- * Note: this version of GCW is based on WooCommerce 1.6.0
27
  *
28
  * @since 0.9.0
29
  */
2
  /*
3
  Plugin Name: Genesis Connect for WooCommerce
4
  Plugin URI: http://www.studiopress.com/plugins/genesis-connect-woocommerce
5
+ Version: 0.9.3
6
  Author: StudioPress
7
  Author URI: http://www.studiopress.com/
8
  Description: Allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
23
  * - Child theme needs to have add_theme_support( 'genesis-connect-woocommerce' ) in functions.php
24
  *
25
  * Note: register_activation_hook() isn't run after auto or manual upgrade, only on activation
26
+ * Note: this version of GCW is based on WooCommerce 1.4.4
27
  *
28
  * @since 0.9.0
29
  */
lib/breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * This file contains functions related modifying Genesis Breadcrumb output
4
  *
5
  * @package genesis_connect_woocommerce
6
- * @version 0.9.4
7
  *
8
  * @since 0.9.0
9
  *
3
  * This file contains functions related modifying Genesis Breadcrumb output
4
  *
5
  * @package genesis_connect_woocommerce
6
+ * @version 0.9.3
7
  *
8
  * @since 0.9.0
9
  *
lib/template-loader.php CHANGED
@@ -3,7 +3,7 @@
3
  * These functions manage loading of templates for WooCommerce
4
  *
5
  * @package genesis_connect_woocommerce
6
- * @version 0.9.4
7
  *
8
  * @since 0.9.0
9
  */
@@ -149,150 +149,4 @@ function gencwooc_template_loader( $template ) {
149
 
150
  if ( $template )
151
  load_template( $template, false );
152
- }
153
-
154
-
155
- /**
156
- * Display shop items
157
- * Provided for backwards compatibility with WooCommerce versions
158
- * pre-1.6.0
159
- *
160
- * Uses WooCommerce structure and contains all existing WooCommerce hooks
161
- * Note that this will also display any content created in the Shop Page itself
162
- *
163
- * Code based on WooCommerce 1.5.5 woocommerce_archive_product_content()
164
- * @see woocommerce/woocommerce-template.php
165
- *
166
- *
167
- * @since 0.9.4
168
- * @global string|int $shop_page_id The ID of the Shop WP Page
169
- */
170
- function genesiswooc_product_archive() {
171
-
172
- global $shop_page_id;
173
-
174
- if ( !is_search() ) :
175
- $shop_page = get_post( $shop_page_id );
176
- $shop_page_title = apply_filters( 'the_title', ( get_option( 'woocommerce_shop_page_title' ) ) ? get_option( 'woocommerce_shop_page_title' ) : $shop_page->post_title );
177
- $shop_page_content = $shop_page->post_content;
178
- else :
179
- $shop_page_title = __( 'Search Results:', 'woocommerce' ) . ' “' . get_search_query() . '”';
180
- if ( get_query_var( 'paged' ) ) $shop_page_title .= ' — ' . __( 'Page', 'woocommerce' ) . ' ' . get_query_var( 'paged' );
181
- $shop_page_content = '';
182
- endif;
183
-
184
- do_action( 'woocommerce_before_main_content' );
185
- ?>
186
-
187
- <h1 class="page-title"><?php echo $shop_page_title ?></h1>
188
-
189
- <?php echo apply_filters( 'the_content', $shop_page_content );
190
-
191
- woocommerce_get_template_part( 'loop', 'shop' );
192
-
193
- do_action( 'woocommerce_pagination' );
194
-
195
- do_action( 'woocommerce_after_main_content' );
196
- }
197
-
198
-
199
- /**
200
- * Displays shop items for the queried taxonomy term
201
- * Provided for backwards compatibility with WooCommerce versions
202
- * pre-1.6.0
203
- *
204
- * Uses WooCommerce structure and contains all existing WooCommerce hooks
205
- *
206
- * Code based on WooCommerce 1.5.5 woocommerce_product_taxonomy_content()
207
- * @see woocommerce/woocommerce-template.php
208
- *
209
- *
210
- * @since 0.9.4
211
- */
212
- function genesiswooc_product_taxonomy() {
213
-
214
- do_action( 'woocommerce_before_main_content' );
215
-
216
- woocommerce_get_template_part( 'loop', 'shop' );
217
-
218
- do_action( 'woocommerce_pagination' );
219
-
220
- do_action( 'woocommerce_after_main_content' );
221
-
222
- }
223
-
224
-
225
- /**
226
- * Displays shop items for archives (taxonomy and main shop page)
227
- * Only loaded if WooC 1.6.0+ is in use.
228
- *
229
- * Uses WooCommerce structure and contains all existing WooCommerce hooks
230
- *
231
- * Code based on WooCommerce 1.6.0 templates/archive-product.php
232
- *
233
- *
234
- * @since 0.9.4
235
- */
236
- function genesiswooc_content_product() {
237
-
238
- do_action('woocommerce_before_main_content');
239
- ?>
240
-
241
- <h1 class="page-title">
242
- <?php if ( is_search() ) : ?>
243
- <?php
244
- printf( __( 'Search Results: &ldquo;%s&rdquo;', 'woocommerce' ), get_search_query() );
245
- if ( get_query_var( 'paged' ) )
246
- printf( __( '&nbsp;&ndash; Page %s', 'woocommerce' ), get_query_var( 'paged' ) );
247
- ?>
248
- <?php elseif ( is_tax() ) : ?>
249
- <?php echo single_term_title( "", false ); ?>
250
- <?php else : ?>
251
- <?php
252
- $shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
253
-
254
- echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title );
255
- ?>
256
- <?php endif; ?>
257
- </h1>
258
-
259
- <?php if ( is_tax() && get_query_var( 'paged' ) == 0 ) : ?>
260
- <?php echo '<div class="term-description">' . wpautop( wptexturize( term_description() ) ) . '</div>'; ?>
261
- <?php elseif ( ! is_search() && get_query_var( 'paged' ) == 0 && ! empty( $shop_page ) && is_object( $shop_page ) ) : ?>
262
- <?php echo '<div class="page-description">' . apply_filters( 'the_content', $shop_page->post_content ) . '</div>'; ?>
263
- <?php endif; ?>
264
-
265
- <?php if ( have_posts() ) : ?>
266
-
267
- <?php do_action('woocommerce_before_shop_loop'); ?>
268
-
269
- <ul class="products">
270
-
271
- <?php woocommerce_product_subcategories(); ?>
272
-
273
- <?php while ( have_posts() ) : the_post(); ?>
274
-
275
- <?php woocommerce_get_template_part( 'content', 'product' ); ?>
276
-
277
- <?php endwhile; // end of the loop. ?>
278
-
279
- </ul>
280
-
281
- <?php do_action('woocommerce_after_shop_loop'); ?>
282
-
283
- <?php else : ?>
284
-
285
- <?php if ( ! woocommerce_product_subcategories( array( 'before' => '<ul class="products">', 'after' => '</ul>' ) ) ) : ?>
286
-
287
- <p><?php _e( 'No products found which match your selection.', 'woocommerce' ); ?></p>
288
-
289
- <?php endif; ?>
290
-
291
- <?php endif; ?>
292
-
293
- <div class="clear"></div>
294
-
295
- <?php do_action( 'woocommerce_pagination' ); ?>
296
-
297
- <?php do_action('woocommerce_after_main_content');
298
  }
3
  * These functions manage loading of templates for WooCommerce
4
  *
5
  * @package genesis_connect_woocommerce
6
+ * @version 0.9.3
7
  *
8
  * @since 0.9.0
9
  */
149
 
150
  if ( $template )
151
  load_template( $template, false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: nathanrice, studiopress, studiograsshopper
3
  Tags: genesis, genesiswp, studiopress, woocommerce
4
  Requires at least: 3.3
5
  Tested up to: 3.4.1
6
- Stable tag: 0.9.4
7
 
8
  This plugin allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
9
 
@@ -15,7 +15,7 @@ To allow easy customization of these templates, and ensure that you do not lose
15
 
16
  Additionally, the plugin makes [Genesis Simple Sidebars](http://wordpress.org/extend/plugins/genesis-simple-sidebars/) and [Genesis Simple Menus](http://wordpress.org/extend/plugins/genesis-simple-menus/) compatible with WooCommerce.
17
 
18
- **This version is compatible with WooCommerce 1.6.0+**
19
 
20
  == Installation ==
21
 
@@ -138,14 +138,10 @@ For the benefit of theme developers and customizers, here is a summary of possib
138
 
139
  == Changelog ==
140
 
141
- = 0.9.4 =
142
- * Released 19 July 2012
143
- * Tweaked archive-product.php and taxonomy.php loop functions to provide compatibility with WooCommerce 1.6.0
144
-
145
  = 0.9.3 =
146
  * Released 14 May 2012
147
  * taxonomy.php and archive-product.php now use woocommerce_get_template_part() instead of gencwooc_get_template_part()
148
- * gencwooc_get_template_part() updated to reflect latest version of woocommerce_get_template_part(). Note: gencwooc_get_template_part() will be deprecated in a future version and is only retained for backwards compatibility.
149
 
150
  = 0.9.2 =
151
  * Released 15 March 2012
3
  Tags: genesis, genesiswp, studiopress, woocommerce
4
  Requires at least: 3.3
5
  Tested up to: 3.4.1
6
+ Stable tag: 0.9.3
7
 
8
  This plugin allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
9
 
15
 
16
  Additionally, the plugin makes [Genesis Simple Sidebars](http://wordpress.org/extend/plugins/genesis-simple-sidebars/) and [Genesis Simple Menus](http://wordpress.org/extend/plugins/genesis-simple-menus/) compatible with WooCommerce.
17
 
18
+ **Requires WooCommerce 1.5.2+. Not compatible with WooCommerce 1.6.0**
19
 
20
  == Installation ==
21
 
138
 
139
  == Changelog ==
140
 
 
 
 
 
141
  = 0.9.3 =
142
  * Released 14 May 2012
143
  * taxonomy.php and archive-product.php now use woocommerce_get_template_part() instead of gencwooc_get_template_part()
144
+ * gencwooc_get_template_part() updated to reflect latest version of woocommerce_get_template_part(). Note: gencwooc_get_template_part() will be deprecated in a future version and is only retained for backwards compatibility.
145
 
146
  = 0.9.2 =
147
  * Released 15 March 2012
sp-plugins-integration/genesis-simple-menus.php CHANGED
@@ -3,7 +3,7 @@
3
  * Integration - Genesis Simple Menus
4
  *
5
  * @package genesis_connect_woocommerce
6
- * @version 0.9.4
7
  *
8
  * @since 0.9.0
9
  *
3
  * Integration - Genesis Simple Menus
4
  *
5
  * @package genesis_connect_woocommerce
6
+ * @version 0.9.3
7
  *
8
  * @since 0.9.0
9
  *
sp-plugins-integration/genesis-simple-sidebars.php CHANGED
@@ -3,7 +3,7 @@
3
  * Integration - Genesis Simple Sidebars
4
  *
5
  * @package genesis_connect_woocommerce
6
- * @version 0.9.4
7
  *
8
  * @since 0.9.0
9
  *
3
  * Integration - Genesis Simple Sidebars
4
  *
5
  * @package genesis_connect_woocommerce
6
+ * @version 0.9.3
7
  *
8
  * @since 0.9.0
9
  *
templates/archive-product.php CHANGED
@@ -2,6 +2,8 @@
2
  /**
3
  * This template displays the archive for Products
4
  *
 
 
5
  * Note for customisers/users: Do not edit this file!
6
  * ==================================================
7
  * If you want to customise this template, copy this file (keep same name) and place the
@@ -29,7 +31,6 @@ remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wra
29
 
30
 
31
  /** Get Shop Page ID */
32
- // @TODO Retained for backwards compatibility with < 1.6.0 WooC installs
33
  global $shop_page_id;
34
  $shop_page_id = get_option( 'woocommerce_shop_page_id' );
35
 
@@ -57,31 +58,46 @@ function genesiswooc_archive_layout( $layout ) {
57
 
58
  add_action( 'genesis_before_loop', 'genesiswooc_archive_product_loop' );
59
  /**
60
- * Display shop items (product custom post archive)
 
 
 
61
  *
62
- * This function has been refactored in 0.9.4 to provide compatibility with
63
- * both WooC 1.6.0 and backwards compatibility with older versions.
64
- * This is needed thanks to substantial changes to WooC template contents
65
- * introduced in WooC 1.6.0.
66
  *
67
- * @uses genesiswooc_content_product() if WooC is version 1.6.0+
68
- * @uses genesiswooc_product_archive() for earlier WooC versions
69
  *
70
  * @since 0.9.0
71
- * @updated 0.9.4
72
- * @global object $woocommerce
73
  */
74
  function genesiswooc_archive_product_loop() {
75
 
76
- global $woocommerce;
77
-
78
- $new = version_compare( $woocommerce->version, '1.6.0', '>=' );
79
-
80
- if ( $new )
81
- genesiswooc_content_product();
82
-
83
- else
84
- genesiswooc_product_archive();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  genesis();
2
  /**
3
  * This template displays the archive for Products
4
  *
5
+ * Based on WooCommerce 1.5.5
6
+ *
7
  * Note for customisers/users: Do not edit this file!
8
  * ==================================================
9
  * If you want to customise this template, copy this file (keep same name) and place the
31
 
32
 
33
  /** Get Shop Page ID */
 
34
  global $shop_page_id;
35
  $shop_page_id = get_option( 'woocommerce_shop_page_id' );
36
 
58
 
59
  add_action( 'genesis_before_loop', 'genesiswooc_archive_product_loop' );
60
  /**
61
+ * Display shop items
62
+ *
63
+ * Uses WooCommerce structure and contains all existing WooCommerce hooks
64
+ * Note that this will also display any content created in the Shop Page itself
65
  *
66
+ * Code based on WooCommerce 1.5.5 woocommerce_archive_product_content()
67
+ * @see woocommerce/woocommerce-template.php
 
 
68
  *
69
+ * @uses woocommerce_get_template_part() since v0.9.3
 
70
  *
71
  * @since 0.9.0
72
+ * @global string|int $shop_page_id The ID of the Shop WP Page
 
73
  */
74
  function genesiswooc_archive_product_loop() {
75
 
76
+ global $shop_page_id;
77
+
78
+ if ( !is_search() ) :
79
+ $shop_page = get_post( $shop_page_id );
80
+ $shop_page_title = apply_filters( 'the_title', ( get_option( 'woocommerce_shop_page_title' ) ) ? get_option( 'woocommerce_shop_page_title' ) : $shop_page->post_title );
81
+ $shop_page_content = $shop_page->post_content;
82
+ else :
83
+ $shop_page_title = __( 'Search Results:', 'woocommerce' ) . ' &ldquo;' . get_search_query() . '&rdquo;';
84
+ if ( get_query_var( 'paged' ) ) $shop_page_title .= ' &mdash; ' . __( 'Page', 'woocommerce' ) . ' ' . get_query_var( 'paged' );
85
+ $shop_page_content = '';
86
+ endif;
87
+
88
+ do_action( 'woocommerce_before_main_content' );
89
+ ?>
90
+
91
+ <h1 class="page-title"><?php echo $shop_page_title ?></h1>
92
+
93
+ <?php echo apply_filters( 'the_content', $shop_page_content );
94
+
95
+ // Revert to WooC's function for template parts since 0.9.3
96
+ woocommerce_get_template_part( 'loop', 'shop' );
97
+
98
+ do_action( 'woocommerce_pagination' );
99
+
100
+ do_action( 'woocommerce_after_main_content' );
101
  }
102
 
103
  genesis();
templates/single-product.php CHANGED
@@ -2,6 +2,8 @@
2
  /**
3
  * This template displays the single Product
4
  *
 
 
5
  * Note for customisers/users: Do not edit this file!
6
  * ==================================================
7
  * If you want to customise this template, copy this file (keep same name) and place the
2
  /**
3
  * This template displays the single Product
4
  *
5
+ * Based on WooCommerce 1.5.5
6
+ *
7
  * Note for customisers/users: Do not edit this file!
8
  * ==================================================
9
  * If you want to customise this template, copy this file (keep same name) and place the
templates/taxonomy.php CHANGED
@@ -2,6 +2,8 @@
2
  /**
3
  * This template displays the Product Category and Tag taxonomy term archives
4
  *
 
 
5
  * Note for customisers/users: Do not edit this file!
6
  * ==================================================
7
  * If you want to customise this template, copy this file (keep same name) and place the
@@ -12,7 +14,6 @@
12
  *
13
  */
14
 
15
-
16
  /** Remove default Genesis loop */
17
  remove_action( 'genesis_loop', 'genesis_do_loop' );
18
 
@@ -31,28 +32,25 @@ add_action( 'genesis_loop', 'genesiswooc_product_taxonomy_loop' );
31
  /**
32
  * Displays shop items for the queried taxonomy term
33
  *
34
- * This function has been refactored in 0.9.4 to provide compatibility with
35
- * both WooC 1.6.0 and backwards compatibility with older versions.
36
- * This is needed thanks to substantial changes to WooC template contents
37
- * introduced in WooC 1.6.0.
38
  *
39
- * @uses genesiswooc_content_product() if WooC is version 1.6.0+
40
- * @uses genesiswooc_product_taxonomy() for earlier WooC versions
41
  *
42
  * @since 0.9.0
43
- * @updated 0.9.4
44
  */
45
  function genesiswooc_product_taxonomy_loop() {
46
 
47
- global $woocommerce;
48
-
49
- $new = version_compare( $woocommerce->version, '1.6.0', '>=' );
50
-
51
- if ( $new )
52
- genesiswooc_content_product();
53
-
54
- else
55
- genesiswooc_product_taxonomy();
56
 
57
  }
58
 
2
  /**
3
  * This template displays the Product Category and Tag taxonomy term archives
4
  *
5
+ * Based on WooCommerce 1.5.5
6
+ *
7
  * Note for customisers/users: Do not edit this file!
8
  * ==================================================
9
  * If you want to customise this template, copy this file (keep same name) and place the
14
  *
15
  */
16
 
 
17
  /** Remove default Genesis loop */
18
  remove_action( 'genesis_loop', 'genesis_do_loop' );
19
 
32
  /**
33
  * Displays shop items for the queried taxonomy term
34
  *
35
+ * Uses WooCommerce structure and contains all existing WooCommerce hooks
36
+ *
37
+ * Code based on WooCommerce 1.5.5 woocommerce_product_taxonomy_content()
38
+ * @see woocommerce/woocommerce-template.php
39
  *
40
+ * @uses woocommerce_get_template_part() since v0.9.3
 
41
  *
42
  * @since 0.9.0
 
43
  */
44
  function genesiswooc_product_taxonomy_loop() {
45
 
46
+ do_action( 'woocommerce_before_main_content' );
47
+
48
+ // Revert to WooC's function for template parts since 0.9.3
49
+ woocommerce_get_template_part( 'loop', 'shop' );
50
+
51
+ do_action( 'woocommerce_pagination' );
52
+
53
+ do_action( 'woocommerce_after_main_content' );
 
54
 
55
  }
56