<?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>WordPress Tutorial - Cody Paste</title>
	<atom:link href="https://www.codypaste.com/category/cms/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codypaste.com/category/cms/wordpress/</link>
	<description>THE WEB PLAYGROUND</description>
	<lastBuildDate>Tue, 22 Oct 2024 05:41:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.codypaste.com/wp-content/uploads/2022/12/cropped-codypaste-32x32.png</url>
	<title>WordPress Tutorial - Cody Paste</title>
	<link>https://www.codypaste.com/category/cms/wordpress/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WorPress WooCommerce Security</title>
		<link>https://www.codypaste.com/worpress-woocommerce-security/</link>
					<comments>https://www.codypaste.com/worpress-woocommerce-security/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Tue, 22 Oct 2024 05:34:22 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1185</guid>

					<description><![CDATA[<p>STEP 1 : .htaccess [crayon-69aba1bba998d783889554/] Important! Change xxx.xxx.xxx.xxx to IP address you wish to allow access xmlrpc.php or remove this line completely. &#160; STEP 2 : Disable XML-RPC to reduce the attack surface. You can do this by adding the following code to your theme&#8217;s functions.php file: [crayon-69aba1bba9998034332705/] &#160; STEP 3 : Use Plugin Wordfence &#160;</p>
<p>The post <a href="https://www.codypaste.com/worpress-woocommerce-security/">WorPress WooCommerce Security</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>STEP 1</strong> :</p>
<p>.htaccess</p><pre class="urvanov-syntax-highlighter-plain-tag"># Block WordPress xmlrpc.php requests
&lt;Files xmlrpc.php&gt;
order deny,allow
deny from all
allow from xxx.xxx.xxx.xxx
&lt;/Files&gt;</pre><p><strong>Important!</strong> Change xxx.xxx.xxx.xxx to IP address you wish to allow access <strong>xmlrpc.php</strong> or remove this line completely.</p>
<p>&nbsp;</p>
<p><strong>STEP 2 :</strong></p>
<p>Disable XML-RPC to reduce the attack surface. You can do this by adding the following code to your theme&#8217;s <code>functions.php</code> file:</p><pre class="urvanov-syntax-highlighter-plain-tag">add_filter('xmlrpc_enabled', '__return_false');</pre><p>&nbsp;</p>
<p><strong>STEP 3 :</strong></p>
<p>Use Plugin <strong><a href="https://www.wordfence.com/products/wordfence-free/" target="_blank" rel="noopener">Wordfence</a></strong></p>
<p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/worpress-woocommerce-security/">WorPress WooCommerce Security</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/worpress-woocommerce-security/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Product Zoom Gallery for e-commerce</title>
		<link>https://www.codypaste.com/product-gallery-for-e-commerce/</link>
					<comments>https://www.codypaste.com/product-gallery-for-e-commerce/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 24 Aug 2024 07:56:52 +0000</pubDate>
				<category><![CDATA[Cool Effect]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1161</guid>

					<description><![CDATA[<p>e-commerce product zoom gallery https://codepen.io/hckkiu/pen/poyoRKQ https://codepen.io/danielhuangg/pen/xqaMrM https://codepen.io/ZowWeb/pen/xxGLrjp https://codepen.io/exclutips/pen/LYEeEjZ</p>
<p>The post <a href="https://www.codypaste.com/product-gallery-for-e-commerce/">Product Zoom Gallery for e-commerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>e-commerce product zoom gallery</p>
<ol>
<li><a href="https://codepen.io/hckkiu/pen/poyoRKQ" target="_blank" rel="noopener">https://codepen.io/hckkiu/pen/poyoRKQ</a></li>
<li><a href="https://codepen.io/danielhuangg/pen/xqaMrM" target="_blank" rel="noopener">https://codepen.io/danielhuangg/pen/xqaMrM</a></li>
<li><a href="https://codepen.io/ZowWeb/pen/xxGLrjp" target="_blank" rel="noopener">https://codepen.io/ZowWeb/pen/xxGLrjp</a></li>
<li><a href="https://codepen.io/exclutips/pen/LYEeEjZ" target="_blank" rel="noopener">https://codepen.io/exclutips/pen/LYEeEjZ</a></li>
</ol>
<p>The post <a href="https://www.codypaste.com/product-gallery-for-e-commerce/">Product Zoom Gallery for e-commerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/product-gallery-for-e-commerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Short Code in WordPress</title>
		<link>https://www.codypaste.com/short-code-in-wordpress/</link>
					<comments>https://www.codypaste.com/short-code-in-wordpress/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Thu, 22 Feb 2024 09:56:09 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1111</guid>

					<description><![CDATA[<p>function.php [crayon-69aba1bba9f9d770912435/] &#160; anytheme [crayon-69aba1bba9fa4203672139/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/short-code-in-wordpress/">Short Code in WordPress</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>function.php</p><pre class="urvanov-syntax-highlighter-plain-tag">function home_blogs(){
    
	$args = array(
        'posts_per_page' =&gt; 3, /* how many post you need to display */
        'offset' =&gt; 0,
        'orderby' =&gt; 'post_date',
        'order' =&gt; 'DESC',
        'post_type' =&gt; 'post', /* your post type name */
        'post_status' =&gt; 'publish'
    );
    $wp_query = new WP_Query($args);
    if ($wp_query-&gt;have_posts()) :
        while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post();
        
        $excerpt    = get_the_excerpt(); 
        $excerpt    = substr($excerpt, 0, 145);
        $exc_result = substr($excerpt, 0, strrpos($excerpt, ' '));
        
        
        $post_thumb = get_the_post_thumbnail_url( get_the_ID(), 'medium' );
        
        if($post_thumb)
        {
        	$post_thumb2 = $post_thumb;
        }else{
        	$post_thumb2 = get_template_directory_uri().'/assets/images/default-post.jpg';
        }
			
	?&gt;
        &lt;!-- Box starts --&gt;
         &lt;div class="col-lg-4 col-md-4 col-sm-12 blog-box"&gt;
            &lt;div class="blog-box-inn"&gt;
               &lt;div class="blog-box-img"&gt;
                  &lt;img src="&lt;?php echo $post_thumb2; ?&gt;" alt=""&gt;
               &lt;/div&gt;
               &lt;div class="blog-box-content"&gt;
                  &lt;h3 class="box-heading"&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
                  &lt;ul class="blog-box-info"&gt;
                     &lt;li&gt;&lt;?php $post_date = get_the_date( 'l F j, Y' ); echo $post_date; ?&gt;&lt;/li&gt;
                     &lt;li&gt;|&lt;/li&gt;
                     &lt;li&gt;Admin&lt;/li&gt;
                  &lt;/ul&gt;
                  &lt;p&gt;
                    &lt;?php echo $exc_result; ?&gt;
                  &lt;/p&gt;
                  &lt;a href="&lt;?php the_permalink(); ?&gt;" class="btn-comm-brdr"&gt;Read more &lt;i class="fas fa-angle-right"&gt;&lt;/i&gt;&lt;/a&gt;
               &lt;/div&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;!-- Box ends --&gt;
		&lt;?php endwhile;  endif;
}
add_shortcode('home_blogs_short', 'home_blogs');</pre><p>&nbsp;</p>
<p>anytheme</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;div&gt;
   &lt;?php echo do_shortcode('[home_blogs_short]'); ?&gt;
&lt;/div&gt;</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/short-code-in-wordpress/">Short Code in WordPress</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/short-code-in-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Send WP Email with HTML Template</title>
		<link>https://www.codypaste.com/send-wp-email-with-html-template/</link>
					<comments>https://www.codypaste.com/send-wp-email-with-html-template/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Tue, 03 Oct 2023 09:58:39 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1070</guid>

					<description><![CDATA[<p>Use custom template in wp_mail() in function.php [crayon-69aba1bbaa145792350290/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/send-wp-email-with-html-template/">Send WP Email with HTML Template</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Use custom template in wp_mail() in function.php</p><pre class="urvanov-syntax-highlighter-plain-tag">$template = file_get_contents(get_template_directory_uri().'/email-template/subscribe.php', true);
$to = $email;
$subject = 'Cody Paste - Subscription';
$body = $template;
$headers = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $to, $subject, $body, $headers );</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/send-wp-email-with-html-template/">Send WP Email with HTML Template</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/send-wp-email-with-html-template/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Recent Post by Category Widget</title>
		<link>https://www.codypaste.com/recent-post-by-category-widget/</link>
					<comments>https://www.codypaste.com/recent-post-by-category-widget/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 27 Sep 2023 09:19:16 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1067</guid>

					<description><![CDATA[<p>Here we will see Recent Post by category dynamically, recent post will change on every category according to category id. So, we will create a widget here. Simply paste this code in functions.php file of your theme, Go to -&#62; Appearance -&#62; Widget, here you will find a widget, just drag and drop this widget &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/recent-post-by-category-widget/" class="more-link">read more<span class="screen-reader-text"> "Recent Post by Category Widget"</span></a></p>
<p>The post <a href="https://www.codypaste.com/recent-post-by-category-widget/">Recent Post by Category Widget</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here we will see Recent Post by category dynamically, recent post will change on every category according to category id.</p>
<p>So, we will create a widget here.</p>
<p>Simply paste this code in <strong>functions.php</strong> file of your theme,</p>
<p><em><strong>Go to -&gt; Appearance -&gt; Widget</strong></em>, here you will find a widget, just drag and drop this widget in widget area.</p>
<p>Note : you can change or update display as you want by using css.</p><pre class="urvanov-syntax-highlighter-plain-tag">/*==============================*/
// Creating the widget
class wpb_widget extends WP_Widget {
 
    function __construct() {
        parent::__construct(
            // Base ID of your widget
            'wpb_widget', 
             
            // Widget name will appear in UI
            __('CodyPaste Recent Post', 'cody_widget_recent'), 
             
            // Widget description
            array( 'description' =&gt; __( 'Recent post by current category', 'cody_widget_recent' ), )
        );
    }
 
    // Creating widget front-end
 
    public function widget( $args, $instance ) {
        $title = apply_filters( 'widget_title', $instance['title'] );
         
        // before and after widget arguments are defined by themes
        echo $args['before_widget'];
        if ( ! empty( $title ) )
        echo $args['before_title'] . $title . $args['after_title'];
         
        // This is where you run the code and display the output
        echo $args['after_widget'];
        
        $category = get_category( get_query_var( 'cat' ) );
        $category_id = $category-&gt;cat_ID;
        
        if($category_id==""){
            $cats = wp_get_post_categories( get_the_ID(), array( 'fields' =&gt; 'ids' ) ); // get cat id of current post
            $category_id = $cats[0];
        }
        
        $args = array(
            'cat' =&gt; $category_id,
            'posts_per_page' =&gt; 5, // Number of posts to display
        );
        
        $recent_posts_query = new WP_Query($args);
        
        // The Loop
        if ($recent_posts_query-&gt;have_posts()) {
            while ($recent_posts_query-&gt;have_posts()) {
                $recent_posts_query-&gt;the_post();
                
                $title      = get_the_title();
                $post_thumb = get_the_post_thumbnail_url( get_the_ID(), 'medium' );
                $post_date  = get_the_date( 'M d, Y' );
                $author     = get_the_author();
                ?&gt;
                &lt;div style="width:100%; display: inline-block;"&gt;
                    &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
                        &lt;div style="width:30%; float:left;"&gt;&lt;img src="&lt;?php echo $post_thumb; ?&gt;" width="100%"&gt;&lt;/div&gt;
                        &lt;div style="width:70%; float:left; padding:0 10px;"&gt;
                            &lt;h4&gt;&lt;?php echo $title; ?&gt;&lt;/h4&gt;
                            &lt;p style="font-size:11px; color:#9f9f9f; text-transform:uppercase;"&gt;By: &lt;?php echo $author; ?&gt; /  ON: &lt;?php echo $post_date; ?&gt;&lt;/p&gt;
                        &lt;/div&gt;
                    &lt;/a&gt;
                &lt;/div&gt;
                &lt;?php
            }
        }else {
            echo 'No posts found.';
        }
        // Restore original Post Data
        wp_reset_postdata();
    }
 
    // Widget Backend
    public function form( $instance ) {
        if ( isset( $instance[ 'title' ] ) ) {
            $title = $instance[ 'title' ];
        }
        else {
            $title = __( 'Cody Paste Recent Post', 'cody_widget_recent' );
        }
        // Widget admin form
        ?&gt;
        &lt;p&gt;
            &lt;label for="&lt;?php echo $this-&gt;get_field_id( 'title' ); ?&gt;"&gt;&lt;?php _e( 'Title:' ); ?&gt;&lt;/label&gt;
            &lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id( 'title' ); ?&gt;" name="&lt;?php echo $this-&gt;get_field_name( 'title' ); ?&gt;" type="text" value="&lt;?php echo esc_attr( $title ); ?&gt;" /&gt;
        &lt;/p&gt;
        &lt;?php
    }
 
    // Updating widget replacing old instances with new
    public function update( $new_instance, $old_instance ) {
        $instance = array();
        $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
        return $instance;
    }
 
// Class wpb_widget ends here
} 
// Register and load the widget
function wpb_load_widget() {
    register_widget( 'wpb_widget' );
}
add_action( 'widgets_init', 'wpb_load_widget' );</pre><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/recent-post-by-category-widget/">Recent Post by Category Widget</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/recent-post-by-category-widget/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Login with Email and Username in WooCommerce</title>
		<link>https://www.codypaste.com/login-with-email-and-username-in-woocommerce/</link>
					<comments>https://www.codypaste.com/login-with-email-and-username-in-woocommerce/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 30 Aug 2023 09:53:47 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1014</guid>

					<description><![CDATA[<p>If your woocommerce user login with email and username not working, you can try given code below. function.php [crayon-69aba1bbaa433223048064/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/login-with-email-and-username-in-woocommerce/">Login with Email and Username in WooCommerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If your woocommerce user login with email and username not working, you can try given code below.</p>
<p><strong>function.php</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">// remove the default filter
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 );
// add custom filter
add_filter( 'authenticate', 'fb_authenticate_username_password', 20, 3 );
function fb_authenticate_username_password( $user, $username, $password ) {

// If an email address is entered in the username box, 
// then look up the matching username and authenticate as per normal, using that.
if ( ! empty( $username ) )
    $user = get_user_by( 'email', $username );

if ( isset( $user-&gt;user_login, $user ) )
    $username = $user-&gt;user_login;

// using the username found when looking up via email
return wp_authenticate_username_password( NULL, $username, $password );
}</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/login-with-email-and-username-in-woocommerce/">Login with Email and Username in WooCommerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/login-with-email-and-username-in-woocommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Custom Order status in WooCommerce</title>
		<link>https://www.codypaste.com/custom-order-status-in-woocommerce/</link>
					<comments>https://www.codypaste.com/custom-order-status-in-woocommerce/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 15 Jul 2023 10:23:35 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1007</guid>

					<description><![CDATA[<p>Create a custom order status in the dropdown &#8216;shipped&#8217; and mail on change status to shipped. &#160; functions.php [crayon-69aba1bbaa586234131582/] &#160; Create a mail file &#8216;customer-shipped-order.php&#8216; /wp-content/themes/storefront/woocommerce/emails/customer-shipped-order.php [crayon-69aba1bbaa58c804317595/] &#160; &#160;</p>
<p>The post <a href="https://www.codypaste.com/custom-order-status-in-woocommerce/">Custom Order status in WooCommerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Create a custom order status in the dropdown &#8216;shipped&#8217; and mail on change status to shipped.</p>
<p>&nbsp;</p>
<p><strong>functions.php</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">function register_shipped_order_status() {
    register_post_status( 'wc-shipped', array(
        'label'                     =&gt; 'Shipped',
        'public'                    =&gt; true,
        'exclude_from_search'       =&gt; false,
        'show_in_admin_all_list'    =&gt; true,
        'show_in_admin_status_list' =&gt; true,
        'label_count'               =&gt; _n_noop( 'Shipped &lt;span class="count"&gt;(%s)&lt;/span&gt;', 'Shipped &lt;span class="count"&gt;(%s)&lt;/span&gt;' )
    ) );
}
add_action( 'init', 'register_shipped_order_status' );


add_filter( 'wc_order_statuses', 'custom_order_status');
function custom_order_status( $order_statuses ) {
    $order_statuses['wc-shipped'] = _x( 'Shipped', 'Order status', 'woocommerce' ); 
    return $order_statuses;
}


//--Email on status change--&gt;
add_action("woocommerce_order_status_changed", "my_awesome_publication_notification");
function get_custom_email_html( $order, $heading = false, $mailer ) {
	$template = 'emails/customer-shipped-order.php';
	return wc_get_template_html( $template, array(
		'order'         =&gt; $order,
		'email_heading' =&gt; $heading,
		'sent_to_admin' =&gt; false,
		'plain_text'    =&gt; false,
		'email'         =&gt; $mailer
	) );
}
function my_awesome_publication_notification($order_id, $checkout=null) {
   global $woocommerce;
   $order = new WC_Order( $order_id );

    // Get the Customer ID (User ID)
    $customer_id = $order-&gt;get_customer_id(); // Or $order-&gt;get_user_id();
    
    // Get the WP_User Object instance
    $user = $order-&gt;get_user();
    
    // Get the WP_User roles and capabilities
    $user_roles = $user-&gt;roles;
    
    // Get the Customer billing email
    $billing_email  = $order-&gt;get_billing_email();
    
    // Get the Customer billing phone
    $billing_phone  = $order-&gt;get_billing_phone();
    
    // Customer billing information details
    $billing_first_name = $order-&gt;get_billing_first_name();
    
   if($order-&gt;status === 'shipped' ) {
      // Create a mailer
      $mailer = $woocommerce-&gt;mailer();

      //$message_body = __( 'Dear '.$billing_first_name.',&lt;br&gt; Your order shipped, &lt;br&gt;Please check ORDER TRACKING detail on your &lt;a href="https://antesports.com/my-account/orders/"&gt;dashboard&lt;/a&gt;' );
	   $subject = 'Order '.$order_id.' Shipped';
	   $message_body = get_custom_email_html($order,$subject,$mailer);

      /*
	   $message = $mailer-&gt;wrap_message(
        // Message head and message body.
        sprintf( __( 'Order %s Shipped' ), $order-&gt;get_order_number() ), 
		   $message_body 
	   );
	  */ 


      // Cliente email, email subject and message.
     $mailer-&gt;send( $order-&gt;billing_email, sprintf( __( 'Order %s Shipped' ), $order-&gt;get_order_number() ), $message_body );
     }

   }

//--Status button color --&gt;
add_action('admin_head', 'styling_admin_order_list' );
function styling_admin_order_list() {
    global $pagenow, $post;

    if( $pagenow != 'edit.php') return; // Exit
    if( get_post_type($post-&gt;ID) != 'shop_order' ) return; // Exit

    // HERE we set your custom status
    $order_status = 'Shipped'; // &lt;==== HERE
    ?&gt;
    &lt;style&gt;
        .order-status.status-&lt;?php echo sanitize_title( $order_status ); ?&gt; {
            background: #d7f8a7;
            color: #0c942b;
        }
    &lt;/style&gt;
    &lt;?php
}</pre><p>&nbsp;</p>
<p>Create a mail file &#8216;<strong>customer-shipped-order.php</strong>&#8216;</p>
<p><strong>/wp-content/themes/storefront/woocommerce/emails/customer-shipped-order.php</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
/**
 * Customer completed order email
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-order.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates\Emails
 * @version 3.7.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/*
 * @hooked WC_Emails::email_header() Output the email header
 */
do_action( 'woocommerce_email_header', $email_heading, $email ); ?&gt;

&lt;?php /* translators: %s: Customer first name */ ?&gt;
&lt;p&gt;&lt;?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order-&gt;get_billing_first_name() ) ); ?&gt;&lt;/p&gt;
&lt;p&gt;&lt;?php esc_html_e( 'We have shipped your order.', 'woocommerce' ); ?&gt;&lt;/p&gt;
&lt;?php

/*
 * @hooked WC_Emails::order_details() Shows the order details table.
 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
 * @since 2.5.0
 */
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );

/*
 * @hooked WC_Emails::order_meta() Shows order meta data.
 */
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );


/*=========================|Tracking Detail|==============================*/
$order_id   = $order-&gt;get_order_number();
$order      = wc_get_order( $order_id );
$shipping   = $order-&gt;meta_data;
$billing    = json_decode($order);
$billing_email = $billing-&gt;billing-&gt;email;
  
$message = '&lt;table style="width:100%;" border="1"&gt;';
   foreach($shipping as $shippingVal){
       if($shippingVal-&gt;key=="ywot_tracking_code"){
           $message .= '&lt;tr&gt;';
            $message .= '&lt;td&gt;Tracking Code : &lt;/td&gt;&lt;td&gt;'.$shippingVal-&gt;value.'&lt;/td&gt;';
           $message .= '&lt;/tr&gt;';
       }
       if($shippingVal-&gt;key=="ywot_pick_up_date"){
           $message .= '&lt;tr&gt;';
           $message .= '&lt;td&gt;Pickup Date : &lt;/td&gt;&lt;td&gt;'.$shippingVal-&gt;value.'&lt;/td&gt;';
           $message .= '&lt;/tr&gt;';
       }
       if($shippingVal-&gt;key=="ywot_carrier_name"){
           $message .= '&lt;tr&gt;';
           $message .= '&lt;td&gt;Courier Name : &lt;/td&gt;&lt;td&gt;'.$shippingVal-&gt;value.'&lt;/td&gt;';
           $message .= '&lt;/tr&gt;';
       }
       if($shippingVal-&gt;key=="ywot_carrier_url"){
           $message .= '&lt;tr&gt;';
           $message .= '&lt;td&gt;Tracking URL : &lt;/td&gt;&lt;td&gt;&lt;a href="'.$shippingVal-&gt;value.'" target="_blank"&gt;'.$shippingVal-&gt;value.'&lt;/a&gt;&lt;/td&gt;';
           $message .= '&lt;/tr&gt;';
       }
   }
$message .= '&lt;/table&gt;';

if(count($shipping) &gt; 0){
    echo'&lt;strong&gt;Tracking Detail:&lt;/strong&gt;'.$message.'&lt;br&gt;&lt;br&gt;';
}
/*=========================|Tracking Detail Close|==============================*/




/*
 * @hooked WC_Emails::customer_details() Shows customer details
 * @hooked WC_Emails::email_address() Shows email address
 */
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );

/**
 * Show user-defined additional content - this is set in each email's settings.
 */
if ( $additional_content ) {
	echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
}








/*
 * @hooked WC_Emails::email_footer() Output the email footer
 */
do_action( 'woocommerce_email_footer', $email );</pre><p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/custom-order-status-in-woocommerce/">Custom Order status in WooCommerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/custom-order-status-in-woocommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Pincode Availability Checking in WooCommerce</title>
		<link>https://www.codypaste.com/pincode-availability-checking-in-woocommerce/</link>
					<comments>https://www.codypaste.com/pincode-availability-checking-in-woocommerce/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 15 Jul 2023 08:17:12 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=999</guid>

					<description><![CDATA[<p>Copy this code in functions.php, and you will see a input box below &#8216;Add to cart&#8216; button. &#160; But before this you have to add pin codes in  your admin dashboard -&#62; WooCommerce -&#62; Settings -&#62; Shipping -&#62; Shipping Zones -&#62; Zone Region  (list available pin codes here) &#160; [crayon-69aba1bbaa71d176820539/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/pincode-availability-checking-in-woocommerce/">Pincode Availability Checking in WooCommerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Copy this code in <strong>functions.php</strong>, and you will see a input box below &#8216;<strong>Add to cart</strong>&#8216; button.</p>
<p>&nbsp;</p>
<p><span style="font-size: 10pt; color: #808080;"><em>But before this you have to add pin codes in  your <strong>admin dashboard -&gt; WooCommerce -&gt; Settings -&gt; Shipping -&gt; Shipping Zones -&gt; Zone Region</strong>  (list available pin codes here)</em></span></p>
<p>&nbsp;</p><pre class="urvanov-syntax-highlighter-plain-tag">// Pincode check ---------&gt;
add_action( 'woocommerce_after_add_to_cart_quantity', 'woo_show_some_text', 20 );
 
function woo_show_some_text() {
    echo '&lt;div class="pincodeSearch"&gt;
			&lt;label&gt;Delivery&lt;/label&gt;
			&lt;input type="text" name="pincode" autocomplete="off" placeholder="Enter Delivery Pincode"&gt;
			&lt;div id="pincodeButton"&gt;
			    Check &lt;span id="pinLoader"&gt;Wait...&lt;/span&gt;
			&lt;/div&gt;
			&lt;div id="picodeRes"&gt;&lt;/div&gt;
	&lt;/div&gt;';
	?&gt;
	&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"&gt;&lt;/script&gt;
	&lt;script&gt;
		$(document).ready(function(){
		  $("#pincodeButton").click(function(){
			$pincode    = $('input[name="pincode"]').val();
			if($pincode==""){
			    //$('#picodeRes').html('&lt;span style="color:yellow;"&gt;Please type pincode&lt;/span&gt;');
			    return false;
			}
			$('#pinLoader').show();
			$('#picodeRes').html('');
			$action = 'checkPincode';
			jQuery.ajax({
				type: "POST",
				url: "/wp-admin/admin-ajax.php",
				data: {
					action  :   $action,
					pincode :   $pincode
				},		
				success: function($res){
				    $('#pinLoader').hide();
					if($res=="1"){
					    $('#picodeRes').html('&lt;span style="color:green;"&gt;Delivery available&lt;/span&gt;');
					}else{
					    $('#picodeRes').html('&lt;span style="color:red;"&gt;Sorry! Delivery not available&lt;/span&gt;');
					}
				}
			});
		  });
		});
	&lt;/script&gt;
	&lt;?php
}

function checkPincode(){
	if(!empty($_POST)){
		if(is_numeric($_POST['pincode']) &amp;&amp; $_POST['pincode']!=""){
			$pincode = wp_check_invalid_utf8($_POST['pincode']);
			
			$delivery_zones = WC_Shipping_Zones::get_zones();
			$i=1;
			foreach ( (array) $delivery_zones as $key =&gt; $the_zone ) {
    			  $zone_array   = $delivery_zones[$i]['zone_locations'];
    			  $available_pincodes     = array();
    			  foreach($zone_array as $zone_arrayVal){
    			      $available_pincodes[] = $zone_arrayVal-&gt;code;
    			  }
    			  if(in_array($pincode, $available_pincodes)){
    			      echo "1";
    			  }else{
    			      echo "0";
    			  }
			  $i++;
			}
			die();
		}else{
			echo'-1';
			die();
		}
	}    
}
add_action( 'wp_ajax_checkPincode', 'checkPincode' );
add_action( 'wp_ajax_nopriv_checkPincode', 'checkPincode' );</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/pincode-availability-checking-in-woocommerce/">Pincode Availability Checking in WooCommerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/pincode-availability-checking-in-woocommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Some useful Woocommerce Settings</title>
		<link>https://www.codypaste.com/some-useful-woocommerce-settings/</link>
					<comments>https://www.codypaste.com/some-useful-woocommerce-settings/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 15 Jul 2023 08:10:32 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=997</guid>

					<description><![CDATA[<p>Write code in function.php Removing Storefront inline css [crayon-69aba1bbaa8b0740521472/] Disable plugin &#38; Theme updates [crayon-69aba1bbaa8b5732362511/] Hide dashboard update notifications for all users [crayon-69aba1bbaa8b7108764562/] Hide update notifications [crayon-69aba1bbaa8b9159728034/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/some-useful-woocommerce-settings/">Some useful Woocommerce Settings</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Write code in function.php</h2>
<h2>Removing Storefront inline css</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">function wpcustom_deregister_scripts_and_styles(){
    wp_deregister_style('storefront-woocommerce-style');
    wp_deregister_style('storefront-style');
}
add_action( 'wp_print_styles', 'wpcustom_deregister_scripts_and_styles', 100 );</pre><p></p>
<h2>Disable plugin &amp; Theme updates</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">add_filter( 'auto_update_plugin', '__return_false' );
add_filter( 'auto_update_theme', '__return_false' );</pre><p></p>
<h2>Hide dashboard update notifications for all users</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">function vipul_hide_update_nag() {
    remove_action( 'admin_notices', 'update_nag', 3 );
}
add_action('admin_menu','vipul_hide_update_nag');</pre><p></p>
<h2>Hide update notifications</h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">function remove_core_updates(){
	global $wp_version;return(object) array('last_checked'=&gt; time(),'version_checked'=&gt; $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates'); //hide updates for WordPress itself
add_filter('pre_site_transient_update_plugins','remove_core_updates'); //hide updates for all plugins
add_filter('pre_site_transient_update_themes','remove_core_updates'); //hide updates for all themes</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/some-useful-woocommerce-settings/">Some useful Woocommerce Settings</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/some-useful-woocommerce-settings/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress Admin – create a page without it appearing in the side menu</title>
		<link>https://www.codypaste.com/wordpress-admin-create-a-page-without-it-appearing-in-the-side-menu/</link>
					<comments>https://www.codypaste.com/wordpress-admin-create-a-page-without-it-appearing-in-the-side-menu/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 01 Apr 2023 05:36:41 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[hide menu from admin]]></category>
		<category><![CDATA[hide menu from admin dashbaord]]></category>
		<category><![CDATA[hide menu from admin in wp]]></category>
		<category><![CDATA[wordpress hide menu from admin]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=974</guid>

					<description><![CDATA[<p>Hide menu from the admin sidebar. [crayon-69aba1bbaa9fe313607210/] &#160; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; hide menu from admin in wp, hide menu from admin dashbaord, wordpress hide menu from admin, hide menu from admin</p>
<p>The post <a href="https://www.codypaste.com/wordpress-admin-create-a-page-without-it-appearing-in-the-side-menu/">WordPress Admin – create a page without it appearing in the side menu</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hide menu from the admin sidebar.</p><pre class="urvanov-syntax-highlighter-plain-tag">add_submenu_page( 
           null,            // -&gt; Set to null - will hide menu link
          'Page Title',    // -&gt; Page Title
          'Menu Title',    // -&gt; Title that would otherwise appear in the menu
          'administrator', // -&gt; Capability level
          'menu_handle',   // -&gt; Still accessible via admin.php?page=menu_handle
          'page_callback' // -&gt; To render the page
    );</pre><p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>hide menu from admin in wp, hide menu from admin dashbaord, wordpress hide menu from admin, hide menu from admin</p>
<p>The post <a href="https://www.codypaste.com/wordpress-admin-create-a-page-without-it-appearing-in-the-side-menu/">WordPress Admin – create a page without it appearing in the side menu</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/wordpress-admin-create-a-page-without-it-appearing-in-the-side-menu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
