<?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>woocommerce Archives - Nick Shaw</title>
	<atom:link href="https://www.nick-shaw.co.uk/tag/woocommerce/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Thu, 06 Feb 2025 12:02:32 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">150481139</site>	<item>
		<title>Show users how much they need to spend to qualify for Klarna on a WooCommerce site</title>
		<link>https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-klarna-on-a-woocommerce-site/</link>
					<comments>https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-klarna-on-a-woocommerce-site/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Thu, 06 Feb 2025 10:27:07 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2228</guid>

					<description><![CDATA[<p>Add this to the functions.php file and then add the shortcode of [dividebyklarna] to get it to show up.</p>
<p>The post <a href="https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-klarna-on-a-woocommerce-site/">Show users how much they need to spend to qualify for Klarna on a WooCommerce site</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Add this to the functions.php file and then add the shortcode of [dividebyklarna] to get it to show up.</p>
<pre class="brush: php; title: ; notranslate">
function wpb_nick_klarna() {  
	global $product;
	$klarnaprice = get_post_meta( get_the_ID(), '_regular_price', true);
	$klarnasaleprice = get_post_meta( get_the_ID(), '_sale_price', true);		
		$y = $klarnaprice;
		$x = $klarnasaleprice;	
		$number = ($y) / 3;
		$rounded = round($number,2);
		
	
if ( $product-&gt;is_type( 'simple' ) ) {	
	if($klarnaprice &gt;=35 &amp;&amp; $klarnaprice &lt;=2000000 ) {		
		if(empty($klarnasaleprice)){			
		   $message = '&lt;div class=&quot;makepaymentsblock klarnablock&quot;&gt;Make 3 payments of '
		   .$message = '£'.$rounded  	
		   .$message = ' using &lt;strong&gt;Klarna&lt;/strong&gt; with no fees and 0% interest. &lt;a class=&quot;sg-popup-id-24192&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';					
		} else {
		   $numbersale = ($x) / 3;	
		   $roundedsale = round($numbersale,2);	
		   $message = '&lt;div class=&quot;makepaymentsblock klarnablock&quot;&gt;Make 3 payments of '
		   .$message = '£'.$roundedsale  	
		   .$message = ' using &lt;strong&gt;Klarna&lt;/strong&gt; with no fees and 0% interest. &lt;a class=&quot;sg-popup-id-24192&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';			
		}		 
	} else {
		if(empty($klarnasaleprice)){		
        	$message = '&lt;div class=&quot;makepaymentsblock klarnablock&quot;&gt;The minimum amount for Klarna is £35 &lt;br/&gt;&lt;a class=&quot;sg-popup-id-24192&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';
		} else {
		    $numbersale = ($x) / 3;	
		    $roundedsale = round($numbersale,2);	
			$message = '&lt;div class=&quot;makepaymentsblock klarnablock&quot;&gt;The minimum amount for Klarna is £35 &lt;br/&gt;&lt;a class=&quot;sg-popup-id-24192&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';
		}
	}
// Output needs to be return
return $message;
}
} 
// register shortcode
add_shortcode('dividebyklarna', 'wpb_nick_klarna'); 
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-klarna-on-a-woocommerce-site/">Show users how much they need to spend to qualify for Klarna on a WooCommerce site</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-klarna-on-a-woocommerce-site/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2228</post-id>	</item>
		<item>
		<title>Show users how much they need to spend to qualify for PayPal on a WooCommerce site</title>
		<link>https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-paypal-on-a-woocommerce-site/</link>
					<comments>https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-paypal-on-a-woocommerce-site/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Thu, 06 Feb 2025 09:59:59 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2230</guid>

					<description><![CDATA[<p>Add this to the functions.php file and then add the shortcode of [dividebypaypal] to get it to show up. // function that runs when shortcode is called function wpb_nick_paypal() { global $product; $paypalprice = get_post_meta( get_the_ID(), '_regular_price', true); $paypalsaleprice = get_post_meta( get_the_ID(), '_sale_price', true); $y = $paypalprice; $x = $paypalsaleprice; $number = ($y) / 4; [&#8230;]</p>
<p>The post <a href="https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-paypal-on-a-woocommerce-site/">Show users how much they need to spend to qualify for PayPal on a WooCommerce site</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Add this to the functions.php file and then add the shortcode of [dividebypaypal] to get it to show up.</p>
<pre class="brush: php; title: ; notranslate">
// function that runs when shortcode is called
function wpb_nick_paypal() {  
	global $product;
	$paypalprice = get_post_meta( get_the_ID(), '_regular_price', true);
	$paypalsaleprice = get_post_meta( get_the_ID(), '_sale_price', true);	
		$y = $paypalprice;
		$x = $paypalsaleprice;
		$number = ($y) / 4;
		$rounded = round($number,2);

if ( $product-&gt;is_type( 'simple' ) ) {	
	if($paypalprice &gt;=99 &amp;&amp; $paypalprice &lt;=2000000 ) {
		if(empty($paypalsaleprice)){
			$message = '&lt;div class=&quot;makepaymentsblock paypalblock&quot;&gt;Make 4 payments of '
	   		.$message = '£'.$rounded  		   
	   		.$message = ' using &lt;strong&gt;PayPal Credit&lt;/strong&gt; with no fees and 0% interest. &lt;a class=&quot;sg-popup-id-24194&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';
		} else {
		    $numbersale = ($x) / 4;	
		    $roundedsale = round($numbersale,2);	
			$message = '&lt;div class=&quot;makepaymentsblock paypalblock&quot;&gt;Make 4 payments of '
	   		.$message = '£'.$roundedsale  		   
	   		.$message = ' using &lt;strong&gt;PayPal Credit&lt;/strong&gt; with no fees and 0% interest. &lt;a class=&quot;sg-popup-id-24194&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';
		}			
	} else {			
		if(empty($paypalsaleprice)){
			$message = '&lt;div class=&quot;makepaymentsblock paypalblock&quot;&gt;The minimum amount for PayPal Credit is £99 &lt;br/&gt;&lt;a class=&quot;sg-popup-id-24194&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';
		 } else {
		    $numbersale = ($x) / 4;	
		    $roundedsale = round($numbersale,2);	
			$message = '&lt;div class=&quot;makepaymentsblock paypalblock&quot;&gt;The minimum amount for PayPal Credit is £99 &lt;br/&gt;&lt;a class=&quot;sg-popup-id-24194&quot; href=&quot;&quot;&gt;Read More&lt;/a&gt;&lt;/div&gt;';		
		 }		
	}
	
// Output needs to be return
return $message;
}
} 
// register shortcode
add_shortcode('dividebypaypal', 'wpb_nick_paypal'); 
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-paypal-on-a-woocommerce-site/">Show users how much they need to spend to qualify for PayPal on a WooCommerce site</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/show-users-how-much-they-need-to-spend-to-qualify-for-paypal-on-a-woocommerce-site/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2230</post-id>	</item>
		<item>
		<title>Show remaining cost on WooCommerce site to get free shipping</title>
		<link>https://www.nick-shaw.co.uk/show-remaining-cost-on-woocommerce-site-to-get-free-shipping/</link>
					<comments>https://www.nick-shaw.co.uk/show-remaining-cost-on-woocommerce-site-to-get-free-shipping/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Wed, 22 Jun 2022 14:23:45 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2223</guid>

					<description><![CDATA[<p>Add this to the functions.php file and then add the shortcode of [shippingleft] to get it to show up. function how_much_shipping_is_left() { $min_amount = 100; //change this to your free shipping threshold $current = WC()-&#62;cart-&#62;subtotal; if ( $current &#60; $min_amount ) { $added_text = 'Get free shipping if you order ' . wc_price( $min_amount - [&#8230;]</p>
<p>The post <a href="https://www.nick-shaw.co.uk/show-remaining-cost-on-woocommerce-site-to-get-free-shipping/">Show remaining cost on WooCommerce site to get free shipping</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Add this to the functions.php file and then add the shortcode of [shippingleft] to get it to show up.</p>
<pre class="brush: php; title: ; notranslate">
function how_much_shipping_is_left() {
   $min_amount = 100; //change this to your free shipping threshold   
   $current = WC()-&gt;cart-&gt;subtotal;  
   if ( $current &lt; $min_amount ) {
	  $added_text = 'Get free shipping if you order ' . wc_price( $min_amount - $current ) . ' more!';
	  $notice = sprintf( '%s', $added_text );
      return $notice;
   } else {
	   $notice = &quot;Order total is over £100 and shipping is free&quot;;
	   return $notice;
   } 
}
add_shortcode('shippingleft', 'how_much_shipping_is_left');
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/show-remaining-cost-on-woocommerce-site-to-get-free-shipping/">Show remaining cost on WooCommerce site to get free shipping</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/show-remaining-cost-on-woocommerce-site-to-get-free-shipping/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2223</post-id>	</item>
		<item>
		<title>WooCommerce hide Klarna payment method if order total is under £35</title>
		<link>https://www.nick-shaw.co.uk/woocommerce-hide-klarna-payment-method-if-order-total-is-under-35/</link>
					<comments>https://www.nick-shaw.co.uk/woocommerce-hide-klarna-payment-method-if-order-total-is-under-35/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Tue, 15 Feb 2022 14:24:55 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2226</guid>

					<description><![CDATA[<p>Add this to the functions.php to hide Klarna payment method if the order total is under £35 //hide klarna if order total is under £35 add_filter( 'woocommerce_available_payment_gateways', 'rudr_turn_off_cod' ); function rudr_turn_off_cod( $available_gateways ) { if( is_admin() ) { return $available_gateways; } // STEP 1: Get order/cart total if( is_wc_endpoint_url( 'order-pay' ) ) { // Pay [&#8230;]</p>
<p>The post <a href="https://www.nick-shaw.co.uk/woocommerce-hide-klarna-payment-method-if-order-total-is-under-35/">WooCommerce hide Klarna payment method if order total is under £35</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Add this to the functions.php to hide Klarna payment method if the order total is under £35</p>
<pre class="brush: php; title: ; notranslate">
//hide klarna if order total is under £35
add_filter( 'woocommerce_available_payment_gateways', 'rudr_turn_off_cod' );
function rudr_turn_off_cod( $available_gateways ) {	
	if( is_admin() ) {
		return $available_gateways;
	}	
	// STEP 1: Get order/cart total
	if( is_wc_endpoint_url( 'order-pay' ) ) { // Pay for order page		
		$order_id = wc_get_order_id_by_order_key( $_GET&#x5B; 'key' ] );
		$order = wc_get_order( $order_id );
		$order_total = $order-&gt;get_total();		
	} else { // Cart/Checkout page
		$order_total = WC()-&gt;cart-&gt;total;
	}	
	// STEP 2: Disable payment gateway if order/cart total is less than 35
	if ( $order_total &lt; 35 ) {
		unset( $available_gateways&#x5B; 'klarna_payments' ] ); // unset klarna
	}
	return $available_gateways;
}
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/woocommerce-hide-klarna-payment-method-if-order-total-is-under-35/">WooCommerce hide Klarna payment method if order total is under £35</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/woocommerce-hide-klarna-payment-method-if-order-total-is-under-35/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2226</post-id>	</item>
		<item>
		<title>Hide menu items in the WordPress Admin Area</title>
		<link>https://www.nick-shaw.co.uk/hide-menu-items-wordpress-admin-area/</link>
					<comments>https://www.nick-shaw.co.uk/hide-menu-items-wordpress-admin-area/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Mon, 23 Jan 2017 19:24:00 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2141</guid>

					<description><![CDATA[<p>Use this to hide menu items in the WordPress admin area that you do not use. &#60;?php function remove_menus_links(){ remove_menu_page( 'edit.php?post_type=portfolio' ); remove_menu_page( 'edit.php?post_type=team' ); remove_menu_page( 'edit.php?post_type=clients' ); remove_menu_page( 'edit.php?post_type=agni_slides' ); } add_action( 'admin_menu', 'remove_menus_links' ); ?&#62;</p>
<p>The post <a href="https://www.nick-shaw.co.uk/hide-menu-items-wordpress-admin-area/">Hide menu items in the WordPress Admin Area</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Use this to hide menu items in the WordPress admin area that you do not use.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php 
function remove_menus_links(){
 remove_menu_page( 'edit.php?post_type=portfolio' );
 remove_menu_page( 'edit.php?post_type=team' );
 remove_menu_page( 'edit.php?post_type=clients' );
 remove_menu_page( 'edit.php?post_type=agni_slides' );
}
add_action( 'admin_menu', 'remove_menus_links' );
?&gt;
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/hide-menu-items-wordpress-admin-area/">Hide menu items in the WordPress Admin Area</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/hide-menu-items-wordpress-admin-area/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2141</post-id>	</item>
		<item>
		<title>Set a maximum image upload size in WordPress</title>
		<link>https://www.nick-shaw.co.uk/set-maximum-image-upload-size-wordpress/</link>
					<comments>https://www.nick-shaw.co.uk/set-maximum-image-upload-size-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Thu, 19 Jan 2017 22:35:13 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2124</guid>

					<description><![CDATA[<p>This can be used to set a maximum image upload size in WordPress, this helps to stop clients uploading large image files. This example is 1.5mb &#60;?php //limit image file size to 1.5mb function whero_limit_image_size($file) { // Calculate the image size in KB $image_size = $file&#x5B;'size']/1024; // File size limit in KB $limit = 1500; [&#8230;]</p>
<p>The post <a href="https://www.nick-shaw.co.uk/set-maximum-image-upload-size-wordpress/">Set a maximum image upload size in WordPress</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This can be used to set a maximum image upload size in WordPress, this helps to stop clients uploading large image files.</p>
<p>This example is 1.5mb</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php 
//limit image file size to 1.5mb
function whero_limit_image_size($file) {
// Calculate the image size in KB
$image_size = $file&#x5B;'size']/1024;
// File size limit in KB
$limit = 1500;
// Check if it's an image
$is_image = strpos($file&#x5B;'type'], 'image');
if ( ( $image_size &gt; $limit ) &amp;&amp; ($is_image !== false) )
        $file&#x5B;'error'] = 'Your picture is too large. It has to be smaller than '. $limit .'KB';
return $file;
}
add_filter('wp_handle_upload_prefilter', 'whero_limit_image_size');
?&gt;
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/set-maximum-image-upload-size-wordpress/">Set a maximum image upload size in WordPress</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/set-maximum-image-upload-size-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2124</post-id>	</item>
		<item>
		<title>Move WooCommerce category description up to be full width</title>
		<link>https://www.nick-shaw.co.uk/move-woocommerce-category-description-full-width/</link>
					<comments>https://www.nick-shaw.co.uk/move-woocommerce-category-description-full-width/#comments</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Tue, 17 Jan 2017 18:15:11 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2122</guid>

					<description><![CDATA[<p>This will move the WooCommerce category description up to be full width instead of in the right hand column. &#60;?php //move cat description up the page remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_before_main_content', 'woocommerce_taxonomy_archive_description', 2 ); ?&#62;</p>
<p>The post <a href="https://www.nick-shaw.co.uk/move-woocommerce-category-description-full-width/">Move WooCommerce category description up to be full width</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This will move the WooCommerce category description up to be full width instead of in the right hand column.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php 
//move cat description up the page
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action( 'woocommerce_before_main_content', 'woocommerce_taxonomy_archive_description', 2 );
?&gt;
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/move-woocommerce-category-description-full-width/">Move WooCommerce category description up to be full width</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/move-woocommerce-category-description-full-width/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2122</post-id>	</item>
		<item>
		<title>Remove WooCommerce long description title &#8216;Product description&#8217;</title>
		<link>https://www.nick-shaw.co.uk/remove-woocommerce-long-description-title-product-description/</link>
					<comments>https://www.nick-shaw.co.uk/remove-woocommerce-long-description-title-product-description/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Sun, 15 Jan 2017 18:12:41 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2116</guid>

					<description><![CDATA[<p>Use this to remove the hardcoded WooCommerce long description title &#8216;Product description&#8217; &#60;?php //remove long desc title add_filter( 'woocommerce_product_description_heading', 'remove_product_description_heading' ); function remove_product_description_heading() { return ''; } ?&#62;</p>
<p>The post <a href="https://www.nick-shaw.co.uk/remove-woocommerce-long-description-title-product-description/">Remove WooCommerce long description title &#8216;Product description&#8217;</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Use this to remove the hardcoded WooCommerce long description title &#8216;Product description&#8217;</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php 
//remove long desc title
add_filter( 'woocommerce_product_description_heading', 'remove_product_description_heading' );
function remove_product_description_heading() {
return '';
}
?&gt;
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/remove-woocommerce-long-description-title-product-description/">Remove WooCommerce long description title &#8216;Product description&#8217;</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/remove-woocommerce-long-description-title-product-description/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2116</post-id>	</item>
		<item>
		<title>Add from before variable prices on WooCommerce</title>
		<link>https://www.nick-shaw.co.uk/add-variable-prices-woocommerce/</link>
					<comments>https://www.nick-shaw.co.uk/add-variable-prices-woocommerce/#respond</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Thu, 05 Jan 2017 20:50:56 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2120</guid>

					<description><![CDATA[<p>Use this in your functions file to add from before variable prices on WooCommerce &#60;?php //add from before price function wc_wc20_variation_price_format( $price, $product ) { // Main Price $prices = array( $product-&#62;get_variation_price( 'min', true ), $product-&#62;get_variation_price( 'max', true ) ); $price = $prices&#x5B;0] !== $prices&#x5B;1] ? sprintf( __( 'from: %1$s', 'woocommerce' ), wc_price( $prices&#x5B;0] ) [&#8230;]</p>
<p>The post <a href="https://www.nick-shaw.co.uk/add-variable-prices-woocommerce/">Add from before variable prices on WooCommerce</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Use this in your functions file to add from before variable prices on WooCommerce</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php 
//add from before price
function wc_wc20_variation_price_format( $price, $product ) {
    // Main Price
    $prices = array( $product-&gt;get_variation_price( 'min', true ), $product-&gt;get_variation_price( 'max', true ) );
    $price = $prices&#x5B;0] !== $prices&#x5B;1] ? sprintf( __( 'from: %1$s', 'woocommerce' ), wc_price( $prices&#x5B;0] ) ) : wc_price( $prices&#x5B;0] );

    // Sale Price
    $prices = array( $product-&gt;get_variation_regular_price( 'min', true ), $product-&gt;get_variation_regular_price( 'max', true ) );
    sort( $prices );
    $saleprice = $prices&#x5B;0] !== $prices&#x5B;1] ? sprintf( __( 'from: %1$s', 'woocommerce' ), wc_price( $prices&#x5B;0] ) ) : wc_price( $prices&#x5B;0] );

    if ( $price !== $saleprice ) {
        $price = '&lt;del&gt;' . $saleprice . '&lt;/del&gt; &lt;ins&gt;' . $price . '&lt;/ins&gt;';
    }

    return $price;
}
add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 );
add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 );
?&gt;
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/add-variable-prices-woocommerce/">Add from before variable prices on WooCommerce</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/add-variable-prices-woocommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2120</post-id>	</item>
		<item>
		<title>Add WooCommerce parent category name as a class to body of child products</title>
		<link>https://www.nick-shaw.co.uk/add-woocommerce-parent-category-name-class-body-child-products/</link>
					<comments>https://www.nick-shaw.co.uk/add-woocommerce-parent-category-name-class-body-child-products/#comments</comments>
		
		<dc:creator><![CDATA[Nick]]></dc:creator>
		<pubDate>Sun, 01 Jan 2017 19:26:07 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.nick-shaw.co.uk/?p=2100</guid>

					<description><![CDATA[<p>If you need to style category pages depending on category this will add the parent category name as a class into the body meaning that you can then target all child categories with a small amount of css. &#60;?php //add woocommerce parent category name to body function woo_custom_taxonomy_in_body_class( $classes ){ $custom_terms = get_the_terms(0, 'product_cat'); if [&#8230;]</p>
<p>The post <a href="https://www.nick-shaw.co.uk/add-woocommerce-parent-category-name-class-body-child-products/">Add WooCommerce parent category name as a class to body of child products</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you need to style category pages depending on category this will add the parent category name as a class into the body meaning that you can then target all child categories with a small amount of css.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//add woocommerce parent category name to body
function woo_custom_taxonomy_in_body_class( $classes ){
    $custom_terms = get_the_terms(0, 'product_cat');
    if ($custom_terms) {
      foreach ($custom_terms as $custom_term) {

        // Check if the parent category exists:
        if( $custom_term-&gt;parent &gt; 0 ) {
            // Get the parent product category:
            $parent = get_term( $custom_term-&gt;parent, 'product_cat' );
            // Append the parent class:
            if ( ! is_wp_error( $parent ) )
                $classes&#x5B;] = 'product_parent_cat_' . $parent-&gt;slug;
        }

        $classes&#x5B;] = 'product_cat_' . $custom_term-&gt;slug;
      }
    }
    return $classes;
}
add_filter( 'body_class', 'woo_custom_taxonomy_in_body_class' );
?&gt;
</pre>
<p>The post <a href="https://www.nick-shaw.co.uk/add-woocommerce-parent-category-name-class-body-child-products/">Add WooCommerce parent category name as a class to body of child products</a> appeared first on <a href="https://www.nick-shaw.co.uk">Nick Shaw</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.nick-shaw.co.uk/add-woocommerce-parent-category-name-class-body-child-products/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2100</post-id>	</item>
	</channel>
</rss>
