<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Grape Kiwi</title>
	<atom:link href="http://www.grapekiwi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grapekiwi.com</link>
	<description></description>
	<lastBuildDate>Wed, 02 May 2012 01:24:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Valhallasun Kennels</title>
		<link>http://www.grapekiwi.com/valhallasun-kennels/</link>
		<comments>http://www.grapekiwi.com/valhallasun-kennels/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 19:01:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=602</guid>
		<description><![CDATA[We worked with owner, Inger, to ensure her website representing her Norbottenspets Swedish dog breeding business maintains a more modern look. More importantly we needed to rework her menu system to make finding the information you really want to see much simpler than it was on the [...]]]></description>
			<content:encoded><![CDATA[<p>We worked with owner, Inger, to ensure her website representing her Norbottenspets Swedish dog breeding business maintains a more modern look. More importantly we needed to rework her menu system to make finding the information you really want to see much simpler than it was on the old site.</p>
<p>With lots of great pictures and videos of the dogs available we put together a cleaner, more modern look for her new website. </p>
<p>Inger lives in and breeds her Norbottenspets out of the beautiful Chapala Lake region in Jalisco Mexico.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/valhallasun-kennels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using WP Approve User Plugin with WooCommerce</title>
		<link>http://www.grapekiwi.com/using-wp-approve-user-plugin-with-woocommerce/</link>
		<comments>http://www.grapekiwi.com/using-wp-approve-user-plugin-with-woocommerce/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 18:49:19 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[catalog]]></category>
		<category><![CDATA[wholesaler]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[wp approve user]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=590</guid>
		<description><![CDATA[WooCommerce is the newest and arguably the best E-Commerce solution available for WordPress. If you aren&#8217;t considering using it for your next E-Commerce website, you should seriously rethink your E-Commerce strategy. In the process of building a new wholesaler website, there were two key modifications that needed [...]]]></description>
			<content:encoded><![CDATA[<p>WooCommerce is the newest and arguably the best E-Commerce solution available for WordPress. If you aren&#8217;t considering using it for your next E-Commerce website, you should seriously rethink your E-Commerce strategy.</p>
<p>In the process of building a new wholesaler website, there were two key modifications that needed to be completed to WooCommerce in order to make it work for the customer&#8217;s business:</p>
<ol>
<li>New users (distributors) must be able to be moderated by an admin so the site owner can choose to approve or reject them as distributors of their product</li>
<li>Visitors must be blocked from seeing pricing and adding items to their cart until they have been registered and approved</li>
</ol>
<h4>Catalog Visibility</h4>
<p>At the outset this seemed easy enough thanks to some great plugins. In order to hide pricing and block adding items to the cart for users that are not logged in, WooCommerce already has a fantastic (albeit paid &#8211; $35) plugin called <a href="http://www.woothemes.com/extension/catalog-visibility-options/">Catalog Visibility Options</a>. This plugin worked perfectly for what we needed using just a couple drop downs. What it doesn&#8217;t do (nor does it claim to do) is manage user registrations &#8211; the other half of the puzzle.</p>
<p><a href="http://www.grapekiwi.com/wp-content/uploads/2012/03/catalog_visibility.png" rel="wp-prettyPhoto[g590]"><img src="http://www.grapekiwi.com/wp-content/uploads/2012/03/catalog_visibility-300x92.png" alt="" title="catalog_visibility" width="300" height="92" class="aligncenter size-medium wp-image-592" /></a></p>
<h4>User Moderation</h4>
<p>User moderation turned out to be a more difficult task. Although the WP Approve User plugin is a well devised addition to WordPress, the custom registration and login capabilities of WooCommerce do not play nicely with plugins that use registration and login hooks. Additionally, WooCommerce has some great email notifications built in, whereas WP Approve User does not do any at all! (This could be for the best &#8211; in the end, unification of notifications is likely only possible using one system).</p>
<p>Upon installing WP Approve User, the first problem I ran into went like this:</p>
<ol>
<li>User registers</li>
<li>WooCommerce automatically logs them in [PROBLEM]</li>
<li>If the user logs out, they can&#8217;t get in again since they have yet to be approved</li>
</ol>
<h5>Removing / working around auto login</h5>
<p>So at this point, the registration is not obeying the WP Approve User plugin when it automatically logs the user in, but the login form *is* obeying the hooks provided by WP Approve User. In order to fix this automatic login during registration, I wrote the following hooks to be placed in your theme&#8217;s functions.php file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> user_autologout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                get_currentuserinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$user_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000088;">$approved_status</span> <span style="color: #339933;">=</span> get_user_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pw_user_status'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #666666; font-style: italic;">//if the user hasn't been approved yet by WP Approve User plugin, log them out immediately</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$approved_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$approved_status</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'approved'</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        wp_logout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        wp_redirect<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span>woocommerce_get_page_id<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myaccount'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;?approved=false&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'woocommerce_before_my_account'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user_autologout'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> registration_message<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$not_approved_message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;p&gt;Send in your registration application today!&lt;br /&gt; NOTE: Your account will be held for moderation and you will be unable to login until it is approved.&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'approved'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$approved</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'approved'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$approved</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'false'</span><span style="color: #009900;">&#41;</span>  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p&gt;Registration successful! You will be notified upon approval of your account.&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$not_approved_message</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$not_approved_message</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'woocommerce_before_customer_login_form'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'registration_message'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This accomplishes two things. It takes care of making sure the user is logged out immediately after WooCommerce logs them in, and second it notifies the user that their registration completed successfully, but they cannot login until they have been approved. The successful registration notification was never needed by WooCommerce because it normally just logs them right into their account &#8211; something we can&#8217;t do in this case.</p>
<h5>Notification Emails</h5>
<p>Next up I discovered that WP Approve User has a couple of Action Hooks we can plug in to for sending out notification emails. Although I didn&#8217;t make use of the unapprove hook, you can easily duplicate my existing work to make that happen if you wish.</p>
<p>You will want to first do as WooCommerce suggests: &#8220;For more advanced control copy woocommerce/templates/emails/ to yourtheme/woocommerce/emails/.&#8221;</p>
<p>Once you&#8217;ve&#8217; copied the templates for safe keeping, head to yourtheme/woocommerce/emails and edit the customer-new-account.php file. You will want this to say that the account has been held for moderation. This means upon user registration, an email with credentials is sent out, but the registrant is again informed that they cannot login immediately.</p>
<p>We also need an email template that is sent when the user is approved by an admin. In yourtheme/woocommerce/emails, create a file called customer-account-approved.php and paste the following in:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ABSPATH'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">exit</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'woocommerce_email_header'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$email_heading</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;p&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Good news! Your account has been approved. You can now login here: <span style="color: #009933; font-weight: bold;">%s</span>.&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woocommerce'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_permalink<span style="color: #009900;">&#40;</span>woocommerce_get_page_id<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'myaccount'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;
&nbsp;
&lt;ul&gt;
        &lt;li&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username: %s'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woocommerce'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_login</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/li&gt;
        &lt;li&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Password: %s'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woocommerce'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_pass</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/li&gt;
&lt;/ul&gt;
&nbsp;
&lt;p&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Thanks for registering with <span style="color: #009933; font-weight: bold;">%s</span>!&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woocommerce'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$blogname</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;
&nbsp;
&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'woocommerce_email_footer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Now that we&#8217;ve got our email templates ready to roll, we need an action hook to send off the approval email when the admin clicks &#8220;approve&#8221; for any user. Again, enter the following in your theme&#8217;s functions.php file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Email Notifications</span>
<span style="color: #666666; font-style: italic;">//Content parsing borrowed from: woocommerce/classes/class-wc-email.php</span>
<span style="color: #000000; font-weight: bold;">function</span> send_user_approve_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$woocommerce</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//Instantiate mailer</span>
	<span style="color: #000088;">$mailer</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$woocommerce</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mailer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$user_id</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_User<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$user_login</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_login</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$user_email</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_email</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$user_pass</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;As specified during registration&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$blogname</span> <span style="color: #339933;">=</span> wp_specialchars_decode<span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blogname'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$subject</span>  <span style="color: #339933;">=</span> apply_filters<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'woocommerce_email_subject_customer_new_account'</span><span style="color: #339933;">,</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Your account on %s has been approved!'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'woocommerce'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$blogname</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$email_heading</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;User <span style="color: #006699; font-weight: bold;">$user_login</span> has been approved&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Buffer</span>
        <span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Get mail template</span>
        woocommerce_get_template<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'emails/customer-account-approved.php'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'user_login'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$user_login</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'user_pass'</span>             <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$user_pass</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'blogname'</span>              <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$blogname</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'email_heading'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$email_heading</span>
       <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Get contents</span>
        <span style="color: #000088;">$message</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ob_get_clean</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Send the mail</span>
        woocommerce_mail<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_email</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span><span style="color: #339933;">,</span> <span style="color: #000088;">$message</span><span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Content-Type: text/html<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$attachments</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpau_approve'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'send_user_approve_email'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> send_user_unapprove_email<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wpau_unapprove'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'send_user_unapprove_email'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>As I mentioned above, you can do the very same with unapprovals (see the empty function at the bottom?), but I didn&#8217;t really need to do so for this project. You would simply create another email template like above, then duplicate most of the approval function into the unapproval function, tweak as necessary and you&#8217;re all set!</p>
<p>I hope this helps anyone else trying to use the WP Approve Users plugin! Please leave your comments and suggestions along with any problems you may have encountered &#8212; I&#8217;d love to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/using-wp-approve-user-plugin-with-woocommerce/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MRB Contracting</title>
		<link>http://www.grapekiwi.com/mrb-contracting/</link>
		<comments>http://www.grapekiwi.com/mrb-contracting/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 03:57:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=585</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/mrb-contracting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSHCC</title>
		<link>http://www.grapekiwi.com/nshcc/</link>
		<comments>http://www.grapekiwi.com/nshcc/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 02:31:16 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=578</guid>
		<description><![CDATA[Working with NSHCC while developing their new website was a great experience. This site is a great mix of showcasing their amazing history along with helping them raise money online. We incorporated the NSHCC brand into this wonderful theme by WooThemes. Built on the WordPress CMS, NSHCC [...]]]></description>
			<content:encoded><![CDATA[<p>Working with NSHCC while developing their new website was a great experience. This site is a great mix of showcasing their amazing history along with helping them raise money online.</p>
<p>We incorporated the NSHCC brand into this wonderful theme by WooThemes. Built on the WordPress CMS, NSHCC now enjoys easy updates and social media integration with their new website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/nshcc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t focus on design until you have content</title>
		<link>http://www.grapekiwi.com/dont-focus-on-design-until-you-have-content/</link>
		<comments>http://www.grapekiwi.com/dont-focus-on-design-until-you-have-content/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 19:34:08 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=540</guid>
		<description><![CDATA[Sitting down to build a website can be a daunting task. With so many different parts of the site to work with, there&#8217;s always a big long list of items to do, from moving the menu up a little to re-wording the about page, these tasks range [...]]]></description>
			<content:encoded><![CDATA[<p>Sitting down to build a website can be a daunting task. With so many different parts of the site to work with, there&#8217;s always a big long list of items to do, from moving the menu up a little to re-wording the about page, these tasks range from design to content adjustments to typography. Just about every time I&#8217;m helping someone learn the WordPress ropes, particularly those who have not worked with a content management system before, it winds up being a challenge to get my new student to wrap their head around the very important order of operations: <strong>put in all your content first! Then focus on the design almost as an afterthought.</strong></p>
<p>It certainly is counter-intuitive if you&#8217;ve ever written any HTML before, since you pretty much have to code large sections of the site before you put any content in (or at least it feels that when when you begin). Even for those who haven&#8217;t written a word of code in their lives, they&#8217;ve surely visited hundreds of websites, and their thought is, &#8220;I want my site to look like this!&#8221; And that&#8217;s a great way to think when you&#8217;re envisioning a website, but it&#8217;s not the right order of operations when it comes to actually implementing the new site.</p>
<h4>Start with content: &#8220;Content is King&#8221;</h4>
<p>As Bill Gates said back in the mid 90s, content is in fact king &#8211; particularly in this context. How can you build a design without any content? The content is the centrepiece of the design &#8211; it&#8217;s the entire reason why you need a design to begin with. <strong>Imagine building a museum with hundreds of show cases and beautiful areas for paintings, but not having any paintings or artwork to showcase.</strong> How do you know what size rooms you need for a collection if you don&#8217;t have the collection? How do you build security casings for artwork that you don&#8217;t have? It works the same for websites &#8211; you need the content before you can build an intuitive and classy design around it.</p>
<h4>Templates to the rescue</h4>
<p>With templates, and more specifically the high quality premium templates available for WordPress, why spend thousands of dollars on a custom design (or less than that on a sub-par custom design) when you can get <a href="http://woothemes.com/">incredibly well build templates</a> for less than $100? &#8220;Okay, but I want my article on jobs over here and my picture over there, your templates can&#8217;t do that! So there.&#8221; Who cares? It really doesn&#8217;t matter to just about anyone exactly where your content is on the page as long as it&#8217;s readable and easy to find. Don&#8217;t get hung up on where every single detail is located, because the large majority of your visitors will not notice.</p>
<p>I&#8217;m not saying to forget about design and the importance of site layouts, but rather, trust that the designer who put together the template you&#8217;ve chosen for your site has a great amount of experience building websites. They&#8217;ve been doing this for years (particularly in the case of premium templates) and they know what is best for the layout and design of your site. You will most certainly have better ideas than the designer on certain elements here and there, but that&#8217;s not something you should <em>ever</em> be thinking about before you even have content on the site.</p>
<p><strong>Your site may look stunningly beautiful after hours or days working on the design, but if you have no content, it&#8217;s completely useless.</strong></p>
<p>Content defines the purpose and character of a website, so the next time you&#8217;re putting together a site, don&#8217;t get hung up on the details of the design before you&#8217;ve even defined a purpose. Go find a nice template and get writing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/dont-focus-on-design-until-you-have-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing our local business web and SEO case study</title>
		<link>http://www.grapekiwi.com/introducing-our-local-business-website-case-study/</link>
		<comments>http://www.grapekiwi.com/introducing-our-local-business-website-case-study/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 00:48:48 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Local Business SEO]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=472</guid>
		<description><![CDATA[Local Business SEO has become a bit of a passion of mine over the last year. I&#8217;ve worked with a number of businesses to help them compete online in their local markets. People are turning to search engines more and more when searching for local products and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.localseoinstitute.com/">Local Business SEO</a> has become a bit of a passion of mine over the last year. I&#8217;ve worked with a number of businesses to help them compete online in their local markets. People are turning to search engines more and more when searching for local products and services and having a great web presence can help a business grow and prosper in even the most competitive of industries.</p>
<p>I recently did a guide on how <a href="http://www.grapekiwi.com/how-to-choose-keywords-for-your-local-business-website/">local businesses can choose the best keywords for their website</a>. This guide sparked the idea of taking a new business website through a 30 day SEO case study. Keeping on track with the topic of my keyword research &#8211; daycares in halifax &#8211; I will be building a business website in this industry and documenting what I do to bring it to the top of the first page on Google.</p>
<p>The site: <a target="_blank" href="http://www.daycarehalifax.ca">Daycare Halifax</a>. (Hang in there while I complete it as much as possible over the next couple days.)</p>
<h4>I will be documenting and demonstrating what I did for the following (check back to this post for links to each demo):</h4>
<p><strong><a target="_blank" href="http://www.grapekiwi.com/how-to-choose-keywords-for-your-local-business-website/">Keyword Research</a></strong><br />
<strong>Onsite Optimization</strong><br />
<strong>Onsite Content Strategy</strong><br />
<strong>Link Building</strong><br />
<strong>Other Website Promotion</strong><br />
<strong>Social Media Integration</strong></p>
<h4>Some of the key measurements that I am interested to see at the end of the case study are as follows:</h4>
<p><strong>Total Time Worked</strong> &#8211; I&#8217;m confident I can keep this in under 15 hours for the month, and under $100 total.<br />
<strong>Beginning Ranking vs Ending Ranking</strong> (and fluctuations in between.)</strong><br />
<strong>Total Traffic Beginning vs Total Traffic Ending</strong> &#8211; and all Analytics Data</p>
<h4>What&#8217;s the point / what&#8217;s the goal?</h4>
<p>Good question. I want to provide a comprehensive outline on how local business owners can create or recreate their websites with a marketing focus in order to increase their search engine rankings, traffic, conversions, and sales.</p>
<p>My ultimate goal for the case study is a top 4 ranking within 30 days of work and 60 days total. Search engines can take a little while to crawl and record the efforts put into an SEO initiative so it&#8217;s always good to give it a bit of time to see what happens. I hope to work less than 30 minutes per day for the first month in order to achieve these results.</p>
<p>No matter what industry you are in and regardless of whether you operate a brick and mortar business or an online business, these tactics will work for you. <strong>Bookmark this post and check back for the links to the updates on this case study.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/introducing-our-local-business-website-case-study/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Choosing the best keywords for your local business</title>
		<link>http://www.grapekiwi.com/how-to-choose-keywords-for-your-local-business-website/</link>
		<comments>http://www.grapekiwi.com/how-to-choose-keywords-for-your-local-business-website/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 15:15:19 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Local Business SEO]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=439</guid>
		<description><![CDATA[Choosing the right keywords to target on your website or blog post is likely the most important aspect of any Search engine optimization initiative. I believe this process is what divides traditional blogs from business-oriented websites. The reason for this is because the keywords you choose are [...]]]></description>
			<content:encoded><![CDATA[<p>Choosing the right keywords to target on your website or blog post is likely the most important aspect of any Search engine optimization initiative. I believe this process is what divides traditional blogs from business-oriented websites. The reason for this is because the keywords you choose are the foundation of your work and everything else from optimization to promotion will be built upon the keywords.</p>
<h4>Why is keyword research important?</h4>
<p>The major reason to do proper keyword research while you are building or optimizing a website is so you learn how your customers are searching for your products and services online. You can stop the guess work and learn the exact keywords they are using to find you &#8211; they may be different than you thought. Having this information allows you to better tailor your content to attract these searchers without having to pay for them.</p>
<h4>Using the Google Keyword Tool</h4>
<p>There are a lot of paid keyword research tools out there that do an excellent job at finding you excellent keywords. For the sake of this lesson, I wanted to assume that most local businesses wanted to operate on an extremely tight budget when it comes to Search Engine Optimization (read: no budget).</p>
<p>The best place to start your keyword research is with the <a target="_blank" href="https://adwords.google.com/select/KeywordToolExternal">Google Keyword Tool</a>. This tool gives you a variety of information on keywords such as global and local search volumes and the cost to advertisers.</p>
<p>Using the GKT isn&#8217;t that difficult, but I have made a quick 4-5 minute video to help you better understand what to look for and how we use it to determine the best keywords for our clients. This video is the same process we use to start any keyword research.</p>
<p><strong>Note:</strong> click the expand button on the bottom right to get the video in a larger screen.</p>
<p><a href="http://www.youtube.com/watch?v=XpqLT8tZskY&#038;fmt=18">http://www.youtube.com/watch?v=XpqLT8tZskY</a></p>
<h4>How many keywords should I target?</h4>
<p>This really depends on how much content your website has, how many pages and articles you may be creating, and much more. To keep things simple, we recommend 2 core keywords for your main home page. Most of the time, these are city keyword and keyword city (eg. <a href="http://www.grapekiwi.com/">Halifax web design</a> and web design halifax).</p>
<p>For your product and service pages, you may want to target a service-specific or product-specific keyword such as buy keyword in city or just buy keyword (eg. buy fishing rod in Halifax).</p>
<p>Every blog post you write on your website, should also be somewhat targeted toward a keyword. Even if that keyword only has a dozen or so searches per month, it is beneficial to capture those visitors with your blog post and have the opportunity to convert them with your website. Without proper keyword research, they wouldn&#8217;t have found your site in the first place.</p>
<h4>Need some help?</h4>
<p>Our <a href="http://www.grapekiwi.com/web-design-package/">Web design package</a> includes basic on-going SEO optimization and promotion. If you currently have our service, simply <a href="/contact/">send us an email</a> and we&#8217;ll be happy to give you a hand. If you&#8217;re not currently a subscriber, we will still offer a free keyword and competitive analysis on your website free of charge. Just contact us through the <a href="/contact/">contact form</a> above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/how-to-choose-keywords-for-your-local-business-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Willys Fresh Cut Fries</title>
		<link>http://www.grapekiwi.com/willys-fresh-cut-fries/</link>
		<comments>http://www.grapekiwi.com/willys-fresh-cut-fries/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 22:06:38 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=546</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/willys-fresh-cut-fries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Greenwich Jewellery</title>
		<link>http://www.grapekiwi.com/greenwich-jewellery/</link>
		<comments>http://www.grapekiwi.com/greenwich-jewellery/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 14:06:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/new/?p=18</guid>
		<description><![CDATA[When the folks at Greenwich came to us looking for a new website, we had a few ideas in mind. We first started with a Tiffany’s style flat blue and white layout, but as we began to build upon the PlatformPro WordPress template we realized, this site [...]]]></description>
			<content:encoded><![CDATA[<p>When the folks at Greenwich came to us looking for a new website, we had a few ideas in mind. We first started with a Tiffany’s style flat blue and white layout, but as we began to build upon the PlatformPro WordPress template we realized, this site can do even better. With a classier black and white colour theme and a somewhat retro style to accompany their logo we merged wp-e-commerce, mailchimp mailing list management, Google Analytics, and dozens of jewellery pieces into a single simplified and beautiful website.<div class="wp-caption alignnone" style="width: 580px"><img alt="Greenwich Jewellery" src="http://www.grapekiwi.com/wp-content/uploads/2011/08/greenwich.png" title="Greenwich Jewellery" width="570" height="326" /><p class="wp-caption-text">Greenwich Jewellery</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/greenwich-jewellery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wine That Goes With&#8230;</title>
		<link>http://www.grapekiwi.com/wine-that-goes-with/</link>
		<comments>http://www.grapekiwi.com/wine-that-goes-with/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 02:32:00 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.grapekiwi.com/?p=491</guid>
		<description><![CDATA[It&#8217;s one thing to decide upon a bottle of wine to drink by itself and a whole other problem when you&#8217;ve got a great meal planned and no idea which wines work well with that meal. You can&#8217;t just grab any wine otherwise the flavours may mix [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s one thing to decide upon a bottle of wine to drink by itself and a whole other problem when you&#8217;ve got a great meal planned and no idea which wines work well with that meal. You can&#8217;t just grab any wine otherwise the flavours may mix horribly!</p>
<p>The writers behind this site have worked in the wine industry for years, tasting thousands of wines and pairing them with a huge variety of meals. We wanted to put together a site that matches the quality of their experience with the quality in design of their website. With the site you see here, we blew away both our own as well as the customer&#8217;s expectations!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapekiwi.com/wine-that-goes-with/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

