<?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>Home of The Richard Knight</title>
	<atom:link href="https://www.therichardknight.com/feed" rel="self" type="application/rss+xml" />
	<link>https://www.therichardknight.com/</link>
	<description>Digital Marketing, Entrepreneurship, Finance</description>
	<lastBuildDate>Thu, 18 Aug 2022 16:10:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.2</generator>

<image>
	<url>https://www.therichardknight.com/wp-content/uploads/2022/08/trk-logo-512-512-cropped-150x150.png</url>
	<title>Home of The Richard Knight</title>
	<link>https://www.therichardknight.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Woocommerce Variations Slow? Fix it in 6 Easy Steps</title>
		<link>https://www.therichardknight.com/woocommerce-variations-slow</link>
					<comments>https://www.therichardknight.com/woocommerce-variations-slow#respond</comments>
		
		<dc:creator><![CDATA[Richard Knight]]></dc:creator>
		<pubDate>Wed, 17 Aug 2022 21:46:32 +0000</pubDate>
				<category><![CDATA[Woocommerce]]></category>
		<guid isPermaLink="false">https://www.therichardknight.com/?p=191</guid>

					<description><![CDATA[<p>So you setup your website, you’ve added all of your products, you made your site slick and pretty at the same time and now when you go to test out your product pages your&#160;Woocommerce Variations are SLOW. This is a big problem and the reason is because the longer it takes for your page to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.therichardknight.com/woocommerce-variations-slow">Woocommerce Variations Slow? Fix it in 6 Easy Steps</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="191" class="elementor elementor-191">
									<section class="elementor-section elementor-top-section elementor-element elementor-element-777b4453 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="777b4453" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-415c837c" data-id="415c837c" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-614927a8 elementor-widget elementor-widget-image" data-id="614927a8" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.13.3 - 28-05-2023 */
.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=".svg"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}</style>												<img decoding="async" width="650" height="650" src="https://www.therichardknight.com/wp-content/uploads/2022/08/fix-woocommerce-slow-variations-issue.jpg" class="attachment-large size-large wp-image-193" alt="" loading="lazy" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/fix-woocommerce-slow-variations-issue.jpg 650w, https://www.therichardknight.com/wp-content/uploads/2022/08/fix-woocommerce-slow-variations-issue-300x300.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/fix-woocommerce-slow-variations-issue-150x150.jpg 150w" sizes="(max-width: 650px) 100vw, 650px" />															</div>
				</div>
				<div class="elementor-element elementor-element-6f5308c1 elementor-widget elementor-widget-text-editor" data-id="6f5308c1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.13.3 - 28-05-2023 */
.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}</style>				<p>So you setup your website, you’ve added all of your products, you made your site slick and pretty at the same time and now when you go to test out your product pages your <strong>Woocommerce Variations are SLOW</strong>.</p><p>This is a big problem and the reason is because the longer it takes for your page to load (i.e – the slower your Woocommerce product page is) the lower your conversion rate (the less people who will buy your stuff).</p><p>The reason is simple. Amazon did a powerful study years ago where they basically tested the impact of page speed on their sales. And the results were downright SHOCKING!</p><blockquote class="wp-block-quote"><p>10 years ago Amazon found that for every 100ms (that’s 1/10 th of a second) of wait time they lost 1% in sales.</p></blockquote><p>Now that you know <strong>WHY </strong>you need to fix this As Soon As Possible here’s some steps to help fix the problem.</p><h2>1. Check Your Average Product Page Load Speed</h2><p>I’m very data driven and when it comes to resolving and diagnosing WordPress and woocommerce issues you should take a data driven approach as well.</p><p>So before you go off installing plugins, changing settings and potentially adding on to the problem, you need to figure out if its pages with lots of variations thats slow or is it all of them.</p><p>The easiest and fastest way to test your Woocommerce product page speed is to enter your product page URLs (not your homepage) into: <a href="https://gtmetrix.com/">https://gtmetrix.com/</a></p><p>I would recommend you test the following</p><ul><li>Product page without variations</li><li>Product page with many variations</li><li>Product page with a few variations</li><li>Your homepage</li></ul><p>Don’t look at anything other than the Fully Loaded Time</p>						</div>
				</div>
				<div class="elementor-element elementor-element-26fa5c5d elementor-widget elementor-widget-image" data-id="26fa5c5d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="735" height="208" src="https://www.therichardknight.com/wp-content/uploads/2022/08/gt-metrix-speed-test-results.jpg" class="attachment-large size-large wp-image-181" alt="" loading="lazy" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/gt-metrix-speed-test-results.jpg 735w, https://www.therichardknight.com/wp-content/uploads/2022/08/gt-metrix-speed-test-results-300x85.jpg 300w" sizes="(max-width: 735px) 100vw, 735px" />															</div>
				</div>
				<div class="elementor-element elementor-element-445be0eb elementor-widget elementor-widget-text-editor" data-id="445be0eb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>What you may find is that all of your pages are consistently around the same speed or certain product pages are slower than others.</p><h2>2. Pick A Fast Webhost</h2><p>Before I go over what to do in WordPress to help fix your slow Woocommerce Variations issue I cannot stress enough the importance of putting your WordPress site on a FAST webhost. </p><p>The tips I’m about to give you are like strapping a rocket to your car. </p><p>Which do you think would go faster, strapping a rocket to a car that has 3 flat tires or a car that has 4 brand new racing tires ready to go?</p><p>That’s what happens when you try to optimize WordPress while you’re on a crappy webhost.</p><p>And the reason is because all web hosting companies are NOT made equal. I had to learn this the hardway when I signed up for Bluehost. </p><p>After getting some really flaky reporting with my sales (Google Analytics and my Facebook Pixel would constantly not report a large number of my sales) I finally went through my checkout process as if I was a customer. </p><p>To my surprise my checkout confirmation page took FOREVER to load which was causing the issue. (check if you’re having this same issue as well)</p><p>Not only was my website slow while on Bluehost, they never turned my backups on! And yes, the only reason I found that out was when I had to restore my site due to a plugin issue.</p><p>After doing some digging, that not ever webhosts invests in fast servers. </p><p>I eventually switched to <a href="https://www.whoisrichardknight.com/recommends/siteground">Siteground</a> which has servers optimized for WordPress and use SSD (Solid State Drives) and is highly recommended on tons of Facebook polls.</p><p>Once I moved my site over (they’ll migrate your site for free as well) every page on my website loaded dramatically faster.</p><h2>3. Use A Cache Plugin</h2><p>A cache plugin allows you to save “static” webpages on your server so after the first visit your page loads dramatically quicker.</p><p>The reason is because as your page loads WordPress is going to the database and finding all the information (and variations) that belongs on that product page. And depending on how much information it needs to pull from the database this can take a while especially if you’re on a slow webhost.</p><p>Siteground automatically comes with their own cache plugin called SG Optimizer.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-2a09ef74 elementor-widget elementor-widget-image" data-id="2a09ef74" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="800" height="434" src="https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot.jpg" class="attachment-large size-large wp-image-182" alt="" loading="lazy" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot.jpg 1024w, https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot-300x163.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot-768x417.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" />															</div>
				</div>
				<div class="elementor-element elementor-element-512e91a2 elementor-widget elementor-widget-text-editor" data-id="512e91a2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>But if you’re on another webhost I would highly recommend WP Rocket.</p><h2>4. Optimize Your WordPress Database</h2><p>Your WordPress database is where all your content and information lives on your WordPress site.</p><p>Overtime your WordPress database can become “bloated” and inefficient. There may be several revisions of posts that you don’t need, trashed, unapproved or SPAM comments, pingbacks, trackbacks and more.</p><p>The bigger your database is the longer it will take to WordPress to get the information it needs from it like your Woocommerce variations when your product page loads.</p><p>WP Rocket has a database cleanup tool but if you don’t want to use WP Rocket then I highly suggest WP Optimize.</p><h2>5. Use Less Woocommerce Attributes</h2><p>Woocommerce does not have a limit on the amount of variations you can add to a product page. But the more attributes you have for your products the more variations you are creating.</p><p>But if all the steps above don’t work and you narrowed your speed issue to your Woocommerce variations then I would suggest you find a way to use less attributes.</p><p>You might want to use a plugin to create check boxes or radio buttons to replace or limit having to make so many variations for your product page.</p><h2>6. Hire A Woocommerce Expert</h2><p>If the problem is a big issue you may want to have a Woocommerce expert take a look at your database queries, your database as a whole as well as your WordPress environment to see what is going on.</p><p>If you need help with this feel free to contact me.</p><hr /><p>In conclusion the faster you can make your product pages the higher your website conversions will be.</p><p>And if you follow these 6 tips I’m sure you’ll end up with a much faster loading product page by the end.</p><p>If you have any comments or questions or if you found this article helpful let me know in the comments.</p>						</div>
				</div>
					</div>
		</div>
							</div>
		</section>
							</div>
		<p>The post <a rel="nofollow" href="https://www.therichardknight.com/woocommerce-variations-slow">Woocommerce Variations Slow? Fix it in 6 Easy Steps</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.therichardknight.com/woocommerce-variations-slow/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Speed Up Woocommerce in 6 Easy Steps</title>
		<link>https://www.therichardknight.com/speed-up-woocommerce</link>
					<comments>https://www.therichardknight.com/speed-up-woocommerce#respond</comments>
		
		<dc:creator><![CDATA[Richard Knight]]></dc:creator>
		<pubDate>Wed, 17 Aug 2022 21:43:05 +0000</pubDate>
				<category><![CDATA[Woocommerce]]></category>
		<category><![CDATA[Speed]]></category>
		<guid isPermaLink="false">https://www.therichardknight.com/?p=178</guid>

					<description><![CDATA[<p>If you’re looking to speed up Woocommerce quickly and easily then you’ve come to the right place. Having a fast loading website is CRITICAL to making the most amount of sales. The reason is simple. Amazon did a powerful study years ago where they basically tested the impact of page speed on their sales. And [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.therichardknight.com/speed-up-woocommerce">How to Speed Up Woocommerce in 6 Easy Steps</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="178" class="elementor elementor-178">
									<section class="elementor-section elementor-top-section elementor-element elementor-element-4c510d09 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="4c510d09" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7ca9c54b" data-id="7ca9c54b" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-2aff4be8 elementor-widget elementor-widget-image" data-id="2aff4be8" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="650" height="650" src="https://www.therichardknight.com/wp-content/uploads/2022/08/speed-up-woocommerce-fast-feat-image.jpg" class="attachment-large size-large wp-image-180" alt="" loading="lazy" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/speed-up-woocommerce-fast-feat-image.jpg 650w, https://www.therichardknight.com/wp-content/uploads/2022/08/speed-up-woocommerce-fast-feat-image-300x300.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/speed-up-woocommerce-fast-feat-image-150x150.jpg 150w" sizes="(max-width: 650px) 100vw, 650px" />															</div>
				</div>
				<div class="elementor-element elementor-element-39aa3350 elementor-widget elementor-widget-text-editor" data-id="39aa3350" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>If you’re looking to speed up Woocommerce quickly and easily then you’ve come to the right place. Having a fast loading website is CRITICAL to making the most amount of sales.</p><p>The reason is simple. Amazon did a powerful study years ago where they basically tested the impact of page speed on their sales. And the results were downright SHOCKING!</p><blockquote class="wp-block-quote"><p>Amazon found that for every 100ms (that’s 1/10 th of a second) of wait time they lost 1% in sales. </p></blockquote><p>But the beauty is that it doesn’t have to be difficult and you don’t have to be a developer to see positive results.</p><p>Below are some quick tips I used to quickly speed up my Woocommerce and you can use to speed up your Woocommerce site as well.</p><h2>1. Check Your Product Page Load Speed</h2><p>Product pages are THE most important part of your Woocommerce site. These are the pages on your website that essentially turn visitors into SALES.</p><p>It’s important to find how fast these pages load before you make any changes or add any plugins. This way you can see what effect any changes have on their performance.</p><p>The easiest and fastest way to test your Woocommerce product page speed is to enter your product page URLs (not your homepage) into: <a href="https://gtmetrix.com/">https://gtmetrix.com/</a></p><p>I would recommend you test the following</p><ul><li>Product page without variations</li><li>Product page with many variations</li><li>Product page with a few variations</li><li>Your homepage</li></ul><p>Don’t look at anything other than the Fully Loaded Time</p>						</div>
				</div>
				<div class="elementor-element elementor-element-6c1d4694 elementor-widget elementor-widget-image" data-id="6c1d4694" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="735" height="208" src="https://www.therichardknight.com/wp-content/uploads/2022/08/gt-metrix-speed-test-results.jpg" class="attachment-large size-large wp-image-181" alt="" loading="lazy" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/gt-metrix-speed-test-results.jpg 735w, https://www.therichardknight.com/wp-content/uploads/2022/08/gt-metrix-speed-test-results-300x85.jpg 300w" sizes="(max-width: 735px) 100vw, 735px" />															</div>
				</div>
				<div class="elementor-element elementor-element-67fe0e0d elementor-widget elementor-widget-text-editor" data-id="67fe0e0d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>What you may find is that all of your pages are consistently around the same speed or certain product pages are slower than others.</p><h2>2. Pick A Fast Webhost</h2><p>Before I go over what to do in WordPress to help speed up your Woocommerce site I cannot stress enough the importance of putting your site on a FAST webhost. </p><p>The tips I’m about to give you are like strapping a rocket to your car. </p><p>Which do you think would go faster, strapping a rocket to a car that has 3 flat tires or a car that has 4 brand new racing tires ready to go?</p><p>That’s what happens when you try to optimize WordPress while you’re on a crappy webhost.</p><p>And the reason is because all web hosting companies are NOT made equal. I had to learn this the hardway when I signed up for Bluehost. </p><p>After getting some really flaky reporting with my sales (Google Analytics and my Facebook Pixel would constantly not report a large number of my sales) I finally went through my checkout process as if I was a customer. </p><p>To my surprise my checkout confirmation page took FOREVER to load which was causing the issue. (check if you’re having this same issue as well)</p><p>Not only was my website slow while on Bluehost, they never turned my backups on! And yes, the only reason I found that out was when I had to restore my site due to a plugin issue.</p><p>After doing some digging, that not ever webhosts invests in fast servers. </p><p>I eventually switched to <a href="https://www.whoisrichardknight.com/recommends/siteground">Siteground</a> which has servers optimized for WordPress and use SSD (Solid State Drives) and is highly recommended on tons of Facebook polls.</p><p>Once I moved my site over (they’ll migrate your site for free as well) every page on my website loaded dramatically faster.</p><h2>3. Use A Cache Plugin</h2><p>A cache plugin allows you to save “static” webpages on your server so after the first visit your page loads dramatically quicker.</p><p>When it comes to page speed, communicating with a database is one of the slowest activities and attributes to a large amount of the wait time of loading a web page.</p><p>And virtually all of the information needed to load your webpage lives in your WordPress database.</p><p>And depending on how much information it needs to pull from the database this can take a while especially if you’re on a slow webhost.</p><p>Siteground automatically comes with their own cache plugin called SG Optimizer.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-35973bc0 elementor-widget elementor-widget-image" data-id="35973bc0" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="800" height="434" src="https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot.jpg" class="attachment-large size-large wp-image-182" alt="" loading="lazy" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot.jpg 1024w, https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot-300x163.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/sg-optimizer-screenshot-768x417.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" />															</div>
				</div>
				<div class="elementor-element elementor-element-51b51a31 elementor-widget elementor-widget-text-editor" data-id="51b51a31" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>But if you’re on another webhost I would highly recommend <strong>WP Rocket</strong>.</p><h2>4. Optimize Your WordPress Database</h2><p>Your WordPress database is where all your content and information lives for your Woocommerce store.</p><p>Overtime your WordPress database can become “bloated” and inefficient. There may be several revisions of posts that you don’t need, trashed, unapproved or SPAM comments, pingbacks, trackbacks and more.</p><p>Think of your WordPress database like a huge filing cabinet. The more files you put in it and the bigger it is, the more difficult it is to find something.</p><p>The same is true for your database, the bigger it is and the more stuff it has inside, the longer it will take for WordPress to get the information it needs to load your Woocommerce pages.</p><p><strong>WP Rocket</strong> has a database cleanup tool but if you don’t want to use WP Rocket then I highly suggest <strong>WP Optimize</strong>.</p><h2>5. Use a Fast Woocommerce Theme</h2><p>Not all themes are created equal. And this is definitely true when it comes to Woocommerce speed.</p><p>I know it can be difficult to find a theme that you like and has all the features let alone one that has all features you want AND loads fast.</p><p>I fell into this trap when I was trying to improve the load speed of my Woocommerce sites.</p><p>If you’re looking for a fast Woocommerce theme, I would highly recommend looking at the Flatsome Theme.</p><p>It has tons of great features that make building your Woocomerce site quick and easy. (I love the UX builder and the Flatsome studio) but it loads FAST.</p><p><strong>Quick way to find Fast Woocommerce Themes</strong></p><p>Most themes have a demo site, especially if you’re searching on <strong>Themeforest</strong>.</p><p>To check their speed, just go to their demo site and enter the url into GTMetrix. I would also check to see how fast their product pages load as well (especially ones with a lot of variations).</p><h2>6. Hire a Woocommerce Expert</h2><p>If you think your Woocommerce site is still slow after taking all of these steps then I would highly recommend you have a Woocommerce expert take a look at your database queries, your database as a whole as well as your WordPress environment to see what is going on.</p><p>If you need help with this feel free to contact me.</p><hr /><p>In conclusion the faster you can make your product pages and home page the higher your website conversions will be.</p><p>And if you follow these 6 tips I’m sure you’ll end up with a much faster loading product page by the end.</p><p>If you have any comments or questions or if you found this article helpful let me know in the comments.</p>						</div>
				</div>
					</div>
		</div>
							</div>
		</section>
							</div>
		<p>The post <a rel="nofollow" href="https://www.therichardknight.com/speed-up-woocommerce">How to Speed Up Woocommerce in 6 Easy Steps</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.therichardknight.com/speed-up-woocommerce/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Quick Tutorial: woocommerce_single_product_summary Hook</title>
		<link>https://www.therichardknight.com/woocommerce-single-product-summary-hook</link>
					<comments>https://www.therichardknight.com/woocommerce-single-product-summary-hook#respond</comments>
		
		<dc:creator><![CDATA[Richard Knight]]></dc:creator>
		<pubDate>Wed, 17 Aug 2022 21:32:13 +0000</pubDate>
				<category><![CDATA[Hook Reference]]></category>
		<category><![CDATA[Woocommerce]]></category>
		<category><![CDATA[Action Hook]]></category>
		<guid isPermaLink="false">https://www.therichardknight.com/?p=161</guid>

					<description><![CDATA[<p>The post <a rel="nofollow" href="https://www.therichardknight.com/woocommerce-single-product-summary-hook">Quick Tutorial: woocommerce_single_product_summary Hook</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="161" class="elementor elementor-161">
									<section class="elementor-section elementor-top-section elementor-element elementor-element-65b0a03 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="65b0a03" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-91ab48d" data-id="91ab48d" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-67090a5 elementor-widget elementor-widget-global elementor-global-145 elementor-widget-template" data-id="67090a5" data-element_type="widget" data-widget_type="template.default">
				<div class="elementor-widget-container">
					<div class="elementor-template">
					<div data-elementor-type="page" data-elementor-id="143" class="elementor elementor-143">
									<section class="elementor-section elementor-top-section elementor-element elementor-element-51db8a34 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="51db8a34" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6319f2ab" data-id="6319f2ab" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-27ef356a elementor-widget elementor-widget-text-editor" data-id="27ef356a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Are you trying to update your Woocommerce single product pages?</p>
<p>In the next few minutes you will discover how to dynamically update, edit and change the <strong>woocommerce_single_product_summary</strong> hook for your Woocommerce product pages.<span id="hook-type-header"></span></p>
						</div>
				</div>
				<div class="elementor-element elementor-element-443cc54b elementor-widget elementor-widget-text-editor" data-id="443cc54b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><img decoding="async" loading="lazy" class="alignnone wp-image-167 size-full" src="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update.jpg" alt="" width="855" height="540" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update.jpg 855w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update-300x189.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update-768x485.jpg 768w" sizes="(max-width: 855px) 100vw, 855px" /></p>
						</div>
				</div>
				<div class="elementor-element elementor-element-731421df elementor-widget elementor-widget-heading" data-id="731421df" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.13.3 - 28-05-2023 */
.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}</style><h2 class="elementor-heading-title elementor-size-default">Best use(s) of this hook:</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-6aedbed elementor-widget elementor-widget-text-editor" data-id="6aedbed" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>When you want to update, modify or add something in the summary section / (div) of the product page which is typically found on the right side of the product page.</p>
<p>You&#8217;ll see what I mean with the example later.</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-7b19997f elementor-widget elementor-widget-heading" data-id="7b19997f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Usage</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-481cdc6b elementor-widget elementor-widget-code-highlight" data-id="481cdc6b" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php ">
				<code readonly="true" class="language-php">
					<xmp>add_action( 'woocommerce_single_product_summary', string $callback_function , int $priority = 10);</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-503c0940 elementor-widget elementor-widget-heading" data-id="503c0940" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Parameters:</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-55cbc8e2 elementor-widget elementor-widget-text-editor" data-id="55cbc8e2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ol>
<li><strong><span class="param">$callback_function</span></strong>
<ol>
<li>(<em>string</em>) (<em>Required</em>) name of callback function</li>
</ol>
</li>
<li><strong><span class="param"><span class="param">$priority</span></span></strong>
<ol>
<li><span class="param">(<em>int</em>) (<em>Optional</em>) </span>Used to specify the order in which the functions associated with a particular action are executed. Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.</li>
</ol>
</li>
</ol>
<p style="padding-left: 80px;">Default value: 10</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-3197de55 elementor-widget elementor-widget-heading" data-id="3197de55" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Type of Hook: <span class="woo-color">Action</span></h2>		</div>
				</div>
				<div class="elementor-element elementor-element-3d9624d1 elementor-widget elementor-widget-text-editor" data-id="3d9624d1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
													</div>
				</div>
				<div class="elementor-element elementor-element-688fbf60 elementor-widget elementor-widget-heading" data-id="688fbf60" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">When Is This Hook Executed</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-1a9ccefc elementor-widget elementor-widget-text-editor" data-id="1a9ccefc" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This hook is executed after: <strong>woocommerce_after_single_product_summary</strong> hook.</p><p>This hook is executed before: <strong>woocommerce_before_single_product_summary</strong> hook</p>						</div>
				</div>
				<div class="elementor-element elementor-element-5e66e36d elementor-widget elementor-widget-heading" data-id="5e66e36d" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Default Actions That Use The <span class="woo-color">Woocommerce_Single_Product_Summary</span> Hook</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-59056965 elementor-widget elementor-widget-text-editor" data-id="59056965" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Below are functions that are automatically added to this hook by Woocommerce.</p><p>You can control when your function will be executed within this hook by changing the priority of your callback function. <strong>(lower number equals higher priority)</strong></p><p><strong>For example:</strong> If you want your function to execute before any of these functions then set your priority to less than 10.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-233e62a7 elementor-widget elementor-widget-code-highlight" data-id="233e62a7" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php ">
				<code readonly="true" class="language-php">
					<xmp>add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 20 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_sharing’, 50 );</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-7256f470 elementor-widget elementor-widget-heading" data-id="7256f470" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">How to Use This Hook</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-4e9c15e0 elementor-widget elementor-widget-text-editor" data-id="4e9c15e0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							You can easily add your own function to this hook by the <a href="https://developer.wordpress.org/reference/functions/add_action/" target="_blank" rel="noopener">add_action()</a> function. Simply add the following code in your functions.php file in your theme. (hopefully you’re using a child theme)						</div>
				</div>
				<div class="elementor-element elementor-element-1f08d7b elementor-widget elementor-widget-code-highlight" data-id="1f08d7b" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php line-numbers">
				<code readonly="true" class="language-php">
					<xmp>// Define your callback function
function my_custom_function_name ( $optional_values ) {
    // enter your code here...
};

// Add this action to the hook
add_action( 'woocommerce_single_product_summary', 'my_custom_function_name', 10);</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-4f4bab5a elementor-widget elementor-widget-heading" data-id="4f4bab5a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">How to Remove an Action From This Hook</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-7fd8797f elementor-widget elementor-widget-text-editor" data-id="7fd8797f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>You can also remove an action that has been added to this hook by using the <a href="https://developer.wordpress.org/reference/functions/remove_action/" target="_blank" rel="noopener">remove_action()</a> function. Simply add the following code in your functions.php file in your theme.</p>

<p>Below is an example of how we would remove the example above from this hook:</p>						</div>
				</div>
				<div class="elementor-element elementor-element-14a706c5 elementor-widget elementor-widget-code-highlight" data-id="14a706c5" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php line-numbers">
				<code readonly="true" class="language-php">
					<xmp>// remove the action 
remove_action( 'woocommerce_single_product_summary', 'my_custom_function_name', 10); </xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-367a34ab elementor-widget elementor-widget-heading" data-id="367a34ab" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default"><span class="woo-color">Woocommerce_Single_Product_Summary </span>
Example (With Sample Code):</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-621b139d elementor-widget elementor-widget-text-editor" data-id="621b139d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Lets say I wanted to highlight each product that was tagged “Editor’s Choice”</p>
<h4 class="has-text-align-center">Before woocommerce_single_product_summary Hook update</h4>
<p><img decoding="async" loading="lazy" class="alignnone wp-image-168 size-full" src="https://www.therichardknight.com/wp-content/uploads/2022/08/before_woocommerce_single_product_summary_hook_update.jpg" alt="" width="873" height="496" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/before_woocommerce_single_product_summary_hook_update.jpg 873w, https://www.therichardknight.com/wp-content/uploads/2022/08/before_woocommerce_single_product_summary_hook_update-300x170.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/before_woocommerce_single_product_summary_hook_update-768x436.jpg 768w" sizes="(max-width: 873px) 100vw, 873px" /></p>
<p>Here is an example of how you would use the woocommerce_single_product_summary Hook to do it</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-108adc94 elementor-widget elementor-widget-code-highlight" data-id="108adc94" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php line-numbers">
				<code readonly="true" class="language-php">
					<xmp>// By using priority 15 the following function will execute after the display price function

add_action( ‘woocommerce_single_product_summary’, ‘update_product_summary’, 15 );

function update_product_summary (){
	$editors_choice_slug_str = ‘editors-choice’;
	$editors_choice_html = ‘<span class=”editor-product”><img width=”40″ src=”https://www.whoisrichardknight.com/wp-content/uploads/2022/01/check-mark.jpg”>Editor\’s Choice (10% Off)‘;
  
  // Get product tags
	$prod_tags_array = get_terms( ‘product_tag’ );
  
	if ( !empty( $prod_tags_array ) && !is_wp_error( $prod_tags_array ) ) :   
		foreach ( $prod_tags_array as $tag_obj ) :		
			// If the product has a tag with the slug set to “editors-choice” then add Editor’s Choice text to product summary
			if ($tag_obj->slug == $editors_choice_slug_str) :
				echo $editors_choice_html;
			endif;
		endforeach;
	endif;
} </xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-322211d3 elementor-widget elementor-widget-text-editor" data-id="322211d3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4 class="has-text-align-center">After woocommerce_single_product_summary Hook Modification</h4>
<p><img decoding="async" loading="lazy" class="alignnone wp-image-167 size-full" src="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update.jpg" alt="" width="855" height="540" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update.jpg 855w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update-300x189.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_single_product_summary_hook_update-768x485.jpg 768w" sizes="(max-width: 855px) 100vw, 855px" /></p>
<p>&nbsp;</p>
<p>** Remember there is an endless number of customizations you can do with this hook to help increase your Woocommerce sales, this is just one “tiny” example.</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-47ddc98a elementor-widget elementor-widget-heading" data-id="47ddc98a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Code Definition</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-457d7a38 elementor-widget elementor-widget-text-editor" data-id="457d7a38" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This action is defined / executed in the following Woocommerce location(s):</p>
<ul>
<li><a href="https://github.com/woocommerce/woocommerce/blob/3611d4643791bad87a0d3e6e73e031bb80447417/plugins/woocommerce/templates/content-single-product.php" target="_blank" rel="noopener">plugins/woocommerce/templates/content-single-product.php</a></li>
<li><a href="https://github.com/woocommerce/woocommerce/blob/3611d4643791bad87a0d3e6e73e031bb80447417/plugins/woocommerce/includes/wc-template-hooks.php" target="_blank" rel="noopener">plugins/woocommerce/includes/wc-template-hooks.php</a></li>
</ul>
						</div>
				</div>
				<div class="elementor-element elementor-element-7b5cd110 text-hook-params elementor-widget elementor-widget-heading" data-id="7b5cd110" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default"><span class="woo-color">Woocommerce_Single_Product_Summary</span> Hook Resource Links</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-7eaf6829 elementor-widget elementor-widget-text-editor" data-id="7eaf6829" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<div>
<ul>
<li><a href="https://github.com/woocommerce/woocommerce/search?utf8=%E2%9C%93&amp;q=woocommerce_before_single_product_summary" target="_blank" rel="noopener">Official Woocommerce Github Link</a></li>
<li><a href="https://www.whoisrichardknight.com/reference/woocommerce-hooks" target="_blank" rel="noopener">Woocommerce Hooks Reference Link</a></li>
<li><a href="https://developer.wordpress.org/plugins/hooks/actions/" target="_blank" rel="noopener">WordPress add_action code reference</a></li>
</ul>
</div>
						</div>
				</div>
					</div>
		</div>
							</div>
		</section>
							</div>
				</div>
				</div>
				</div>
					</div>
		</div>
							</div>
		</section>
							</div>
		<p>The post <a rel="nofollow" href="https://www.therichardknight.com/woocommerce-single-product-summary-hook">Quick Tutorial: woocommerce_single_product_summary Hook</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.therichardknight.com/woocommerce-single-product-summary-hook/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Quick Tutorial: woocommerce_before_single_product_summary Hook</title>
		<link>https://www.therichardknight.com/woocommerce-before-single-product-summary-hook</link>
					<comments>https://www.therichardknight.com/woocommerce-before-single-product-summary-hook#respond</comments>
		
		<dc:creator><![CDATA[Richard Knight]]></dc:creator>
		<pubDate>Wed, 17 Aug 2022 20:49:23 +0000</pubDate>
				<category><![CDATA[Hook Reference]]></category>
		<category><![CDATA[Woocommerce]]></category>
		<category><![CDATA[Action Hook]]></category>
		<guid isPermaLink="false">https://www.therichardknight.com/?p=110</guid>

					<description><![CDATA[<p>The post <a rel="nofollow" href="https://www.therichardknight.com/woocommerce-before-single-product-summary-hook">Quick Tutorial: woocommerce_before_single_product_summary Hook</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="110" class="elementor elementor-110">
									<section class="elementor-section elementor-top-section elementor-element elementor-element-760828b3 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="760828b3" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-499b9b50" data-id="499b9b50" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-afe51c8 elementor-widget elementor-widget-global elementor-global-145 elementor-widget-template" data-id="afe51c8" data-element_type="widget" data-widget_type="template.default">
				<div class="elementor-widget-container">
					<div class="elementor-template">
					<div data-elementor-type="page" data-elementor-id="143" class="elementor elementor-143">
									<section class="elementor-section elementor-top-section elementor-element elementor-element-51db8a34 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="51db8a34" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6319f2ab" data-id="6319f2ab" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-27ef356a elementor-widget elementor-widget-text-editor" data-id="27ef356a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Are you trying to update your Woocommerce single product pages?</p>
<p>In the next few minutes you will discover how to dynamically update, edit and change the <strong>woocommerce_before_single_product_summary</strong> hook for your Woocommerce product pages.</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-443cc54b elementor-widget elementor-widget-text-editor" data-id="443cc54b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><img decoding="async" loading="lazy" class="alignnone wp-image-139 size-full" src="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit.jpg" alt="" width="888" height="576" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit.jpg 888w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit-300x195.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit-768x498.jpg 768w" sizes="(max-width: 888px) 100vw, 888px" /></p>
						</div>
				</div>
				<div class="elementor-element elementor-element-731421df elementor-widget elementor-widget-heading" data-id="731421df" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Best use(s) of this hook:</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-6aedbed elementor-widget elementor-widget-text-editor" data-id="6aedbed" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>When you want to update, modify or add something <strong>before</strong> the summary section / (div) of the product page.</p>
<p>The exact placement and div that encloses this hook depends on your theme but this hook typically controls the left side of the product page.</p>
<p>This usually consists of the product images, product thumbnails and the “SALE” image.</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-7b19997f elementor-widget elementor-widget-heading" data-id="7b19997f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Usage</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-481cdc6b elementor-widget elementor-widget-code-highlight" data-id="481cdc6b" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php ">
				<code readonly="true" class="language-php">
					<xmp>add_action( 'woocommerce_before_single_product_summary', string $callback_function , int $priority = 10);</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-503c0940 elementor-widget elementor-widget-heading" data-id="503c0940" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Parameters:</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-55cbc8e2 elementor-widget elementor-widget-text-editor" data-id="55cbc8e2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<ol>
<li><strong><span class="param">$callback_function</span></strong>
<ol>
<li>(<em>string</em>) (<em>Required</em>) name of callback function</li>
</ol>
</li>
<li><strong><span class="param"><span class="param">$priority</span></span></strong>
<ol>
<li><span class="param">(<em>int</em>) (<em>Optional</em>) </span>Used to specify the order in which the functions associated with a particular action are executed. Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.</li>
</ol>
</li>
</ol>
<p style="padding-left: 80px;">Default value: 10</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-3197de55 elementor-widget elementor-widget-heading" data-id="3197de55" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Type of Hook: <span class="woo-color">Action</span></h2>		</div>
				</div>
				<div class="elementor-element elementor-element-3d9624d1 elementor-widget elementor-widget-text-editor" data-id="3d9624d1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
													</div>
				</div>
				<div class="elementor-element elementor-element-688fbf60 elementor-widget elementor-widget-heading" data-id="688fbf60" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">When Is This Hook Executed</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-1a9ccefc elementor-widget elementor-widget-text-editor" data-id="1a9ccefc" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This hook is executed after: <strong>woocommerce_single_product_summary</strong> hook.</p><p>This hook is executed before: <strong>woocommerce_before_single_product</strong> hook</p>						</div>
				</div>
				<div class="elementor-element elementor-element-5e66e36d elementor-widget elementor-widget-heading" data-id="5e66e36d" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Default Actions That Use The <span class="woo-color">Woocommerce_Before_Single_Product_Summary</span> Hook</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-59056965 elementor-widget elementor-widget-text-editor" data-id="59056965" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Below are functions that are automatically added to this hook by Woocommerce.</p><p>You can control when your function will be executed within this hook by changing the priority of your callback function. <strong>(lower number equals higher priority)</strong></p><p><strong>For example:</strong> If you want your function to execute before any of these functions then set your priority to less than 10.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-233e62a7 elementor-widget elementor-widget-code-highlight" data-id="233e62a7" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php ">
				<code readonly="true" class="language-php">
					<xmp>add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_sale_flash’, 10 );
add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );
add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_thumbnails’, 20 );</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-7256f470 elementor-widget elementor-widget-heading" data-id="7256f470" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">How to Use This Hook</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-4e9c15e0 elementor-widget elementor-widget-text-editor" data-id="4e9c15e0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							You can easily add your own function to this hook by the <a href="https://developer.wordpress.org/reference/functions/add_action/" target="_blank" rel="noopener">add_action()</a> function. Simply add the following code in your functions.php file in your theme. (hopefully you’re using a child theme)						</div>
				</div>
				<div class="elementor-element elementor-element-1f08d7b elementor-widget elementor-widget-code-highlight" data-id="1f08d7b" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php line-numbers">
				<code readonly="true" class="language-php">
					<xmp>// Define your callback function
function my_custom_function_name ( $optional_values ) {
    // enter your code here...
};

// Add this action to the hook
add_action( 'woocommerce_before_single_product_summary', 'my_custom_function_name', 10);</xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-4f4bab5a elementor-widget elementor-widget-heading" data-id="4f4bab5a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">How to Remove an Action From This Hook</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-7fd8797f elementor-widget elementor-widget-text-editor" data-id="7fd8797f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>You can also remove an action that has been added to this hook by using the <a href="https://developer.wordpress.org/reference/functions/remove_action/" target="_blank" rel="noopener">remove_action()</a> function. Simply add the following code in your functions.php file in your theme.</p>

<p>Below is an example of how we would remove the example above from this hook:</p>						</div>
				</div>
				<div class="elementor-element elementor-element-14a706c5 elementor-widget elementor-widget-code-highlight" data-id="14a706c5" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php line-numbers">
				<code readonly="true" class="language-php">
					<xmp>// remove the action 
remove_action( 'woocommerce_before_single_product_summary', 'my_custom_function_name', 10); </xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-367a34ab elementor-widget elementor-widget-heading" data-id="367a34ab" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default"><span class="woo-color">Woocommerce_Before_Single_Product_Summary </span>
Example (With Sample Code):</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-621b139d elementor-widget elementor-widget-text-editor" data-id="621b139d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Lets say I wanted to highlight each product that was tagged “WordPress Essential Service” by having text that appeared before the product image.</p>
<h4 class="has-text-align-center">Before woocommerce_before_single_product_summary Hook update</h4>
<p><img decoding="async" loading="lazy" class="alignnone size-full wp-image-140" src="https://www.therichardknight.com/wp-content/uploads/2022/08/before-change-after_woocommerce_before_single_product_summary_hook_update-edit.jpg" alt="" width="888" height="576" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/before-change-after_woocommerce_before_single_product_summary_hook_update-edit.jpg 888w, https://www.therichardknight.com/wp-content/uploads/2022/08/before-change-after_woocommerce_before_single_product_summary_hook_update-edit-300x195.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/before-change-after_woocommerce_before_single_product_summary_hook_update-edit-768x498.jpg 768w" sizes="(max-width: 888px) 100vw, 888px" /></p>
<p>Here is an example of how you would use the woocommerce_before_single_product_summary Hook to do it</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-108adc94 elementor-widget elementor-widget-code-highlight" data-id="108adc94" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
					<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-php line-numbers">
				<code readonly="true" class="language-php">
					<xmp>// By using priority 5 the following function will execute after the display price function
add_action( ‘woocommerce_before_single_product_summary’, ‘update_before_product_summary’, 5 );

function update_before_product_summary (){
	$wp_essential_slug_str = ‘wordpress-essential-service’;
	$wp_essential_html = ‘<span class=”wp-essential-service”><img width=”40″ src=”https://www.whoisrichardknight.com/wp-content/uploads/2022/01/check-mark.jpg”>Wordpress Essential Service‘;

	// Get product tags
	$prod_tags_array = get_terms( ‘product_tag’ );

	if ( !empty( $prod_tags_array ) && !is_wp_error( $prod_tags_array ) ) :
		foreach ( $prod_tags_array as $tag_obj ) :
			// If the product has a tag with the slug set to “wordpress-essential-service” then add text to product page
			if ($tag_obj->slug == $wp_essential_slug_str) :
				echo $wp_essential_html;
			endif;
		endforeach;
	endif;
} </xmp>
				</code>
			</pre>
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-322211d3 elementor-widget elementor-widget-text-editor" data-id="322211d3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<h4 class="has-text-align-center">After woocommerce_before_single_product_summary Hook</h4>
<p><img decoding="async" loading="lazy" class="alignnone size-full wp-image-139" src="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit.jpg" alt="" width="888" height="576" srcset="https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit.jpg 888w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit-300x195.jpg 300w, https://www.therichardknight.com/wp-content/uploads/2022/08/after_woocommerce_before_single_product_summary_hook_update-edit-768x498.jpg 768w" sizes="(max-width: 888px) 100vw, 888px" /></p>
<p>** There is an endless number of customizations you can do with this hook as well as any of the other woocommerce product page hooks… this is just one “tiny” example.</p>
						</div>
				</div>
				<div class="elementor-element elementor-element-47ddc98a elementor-widget elementor-widget-heading" data-id="47ddc98a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Code Definition</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-457d7a38 elementor-widget elementor-widget-text-editor" data-id="457d7a38" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This action is defined / executed in the following Woocommerce location(s):</p>
<ul>
<li><a title="plugins/woocommerce/templates/content-single-product.php" href="https://github.com/woocommerce/woocommerce/blob/3611d4643791bad87a0d3e6e73e031bb80447417/plugins/woocommerce/templates/content-single-product.php">plugins/woocommerce/templates/content-single-product.php</a></li>
<li><a title="plugins/woocommerce/includes/wc-template-hooks.php" href="https://github.com/woocommerce/woocommerce/blob/3611d4643791bad87a0d3e6e73e031bb80447417/plugins/woocommerce/includes/wc-template-hooks.php">plugins/woocommerce/includes/wc-template-hooks.php</a></li>
</ul>
						</div>
				</div>
				<div class="elementor-element elementor-element-7b5cd110 text-hook-params elementor-widget elementor-widget-heading" data-id="7b5cd110" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default"><span class="woo-color">Woocommerce_Before_Single_Product_Summary</span> Hook Resource Links</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-7eaf6829 elementor-widget elementor-widget-text-editor" data-id="7eaf6829" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<div>
<ul>
<li><a href="https://github.com/woocommerce/woocommerce/search?utf8=%E2%9C%93&amp;q=woocommerce_before_single_product_summary" target="_blank" rel="noopener">Official Woocommerce Github Link</a></li>
<li><a href="https://www.whoisrichardknight.com/reference/woocommerce-hooks" target="_blank" rel="noopener">Woocommerce Hooks Reference Link</a></li>
<li><a href="https://developer.wordpress.org/plugins/hooks/actions/" target="_blank" rel="noopener">WordPress add_action code reference</a></li>
</ul>
</div>
						</div>
				</div>
					</div>
		</div>
							</div>
		</section>
							</div>
				</div>
				</div>
				</div>
					</div>
		</div>
							</div>
		</section>
							</div>
		<p>The post <a rel="nofollow" href="https://www.therichardknight.com/woocommerce-before-single-product-summary-hook">Quick Tutorial: woocommerce_before_single_product_summary Hook</a> appeared first on <a rel="nofollow" href="https://www.therichardknight.com">Home of The Richard Knight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.therichardknight.com/woocommerce-before-single-product-summary-hook/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
