From 310e41230ac60e16ddf7093a9b07d8533fcbd61a Mon Sep 17 00:00:00 2001
From: Robert Peake <cyberscribe@users.noreply.github.com>
Date: Sat, 22 Aug 2015 15:59:11 +0100
Subject: [PATCH] Add WooCommerce support

Fully implement [recommended support](http://docs.woothemes.com/document/third-party-custom-theme-compatibility/) for WooCommerce by declaring FoundationPress content wrappers as WooCommerce wrappers.
---
 library/cleanup.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/library/cleanup.php b/library/cleanup.php
index 9216c8c1e..01491067b 100644
--- a/library/cleanup.php
+++ b/library/cleanup.php
@@ -264,4 +264,9 @@ public function img_caption_shortcode( $output, $attr, $content ) {
 
 endif;
 
+// Add WooCommerce support for wrappers per http://docs.woothemes.com/document/third-party-custom-theme-compatibility/
+remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
+add_action('woocommerce_before_main_content', 'foundationpress_before_content', 10);
+remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
+add_action('woocommerce_after_main_content', 'foundationpress_after_content', 10);
 ?>