xDebug PHP Wizard

Setting up xDebug is a bit of a pain as the links are not clearly linked.
So below is some info to help you 😉

In order to use the Install Wizard.
Open your PHPinfo() page from the xampp default dashboard page
http://localhost/dashboard/phpinfo.php

Copy all "Ctrl+A" and paste into the install wizard box and you will get further instructions

The Install Wizard (I think this is mainly for windows. Linux and mac can use terminal)
https://xdebug.org/wizard

Here's the downloads you going to need as the one you get from the wizard is not working. (currently at the time of this post creation)
https://xdebug.org/download#releases

Owl Carousel Docs

Documentation can be found here
Owl Carousel https://owlcarousel2.github.io/OwlCarousel2/

Add font awesome as well because font awesome is awesome.

wp_enqueue_style('fontawesome', 'https://use.fontawesome.com/releases/v5.2.0/css/all.css'); 

It get's used in this project 😉

Lib CDN's can be found here
CDN's https://cdnjs.com/libraries/OwlCarousel2
Scripts and Styles for "wp-enqueu"

// Version 1.3.3
wp_enqueue_style('owl-carousel-min-css','https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.css'); 
wp_enqueue_style('owl-theme-min-css','https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.theme.min.css'); 
wp_enqueue_script('owl-carousel-script-lib','https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js');
// Version 2.0.0-beta
wp_enqueue_style('owl-carousel-min-css','https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.3/assets/owl.carousel.min.css');
wp_enqueue_style('owl-theme-min-css','https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.3/assets/owl.theme.default.min.css');
wp_enqueue_script('owl-carousel-script-lib','https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.3/owl.carousel.min.js');

The library is also inside the Libs folder on the server if you need it. Or you can just download it from the first link above.

<div class="owl-carousel owl-theme" id="about-banner">
    <div class="item">
        <div class="inner-block">
            <div class="icon"> <i class="fas fa-cogs"></i> </div>
            <div class="inner-block-header">
                <h2>Quality Service</h2> </div>
            <div class="inner-block-text">
                <p>The best paragraph</p>
            </div>
        </div>
    </div>
    <div class="item">
        <div class="inner-block">
            <div class="icon"> <i class="fas fa-cogs"></i> </div>
            <div class="inner-block-header">
                <h2>Quality Service</h2> </div>
            <div class="inner-block-text">
                <p>The best paragraph</p>
            </div>
        </div>
    </div>
    <div class="item">
        <div class="inner-block">
            <div class="icon"> <i class="fas fa-cogs"></i> </div>
            <div class="inner-block-header">
                <h2>Quality Service</h2> </div>
            <div class="inner-block-text">
                <p>The best paragraph</p>
            </div>
        </div>
    </div>
    <div class="item">
        <div class="inner-block">
            <div class="icon"> <i class="fas fa-cogs"></i> </div>
            <div class="inner-block-header">
                <h2>Quality Service</h2> </div>
            <div class="inner-block-text">
                <p>The best paragraph</p>
            </div>
        </div>
    </div>
    <div class="item">
        <div class="inner-block">
            <div class="icon"> <i class="fas fa-cogs"></i> </div>
            <div class="inner-block-header">
                <h2>Quality Service</h2> </div>
            <div class="inner-block-text">
                <p>The best paragraph</p>
            </div>
        </div>
    </div>
    <div class="item">
        <div class="inner-block">
            <div class="icon"> <i class="fas fa-cogs"></i> </div>
            <div class="inner-block-header">
                <h2>Quality Service</h2> </div>
            <div class="inner-block-text">
                <p>The best paragraph</p>
            </div>
        </div>
    </div>
</div>
.inner-block .icon {
     color: #f44336;
     text-align: center;
     padding: 10px;
     font-size: 70px;
}
 .inner-block-header {
     text-align: center;
}
 .inner-block-text {
     text-align: center;
}
 #about-banner .inner-block {
     margin: 35px;
     border-top: 1px solid #f44336;
     border-bottom: 1px solid #f44336;
}
#about-banner {
     margin: 25px;
}
$("#about-banner").owlCarousel({
    items: 3,
    itemsDesktop: [1000, 2],
    itemsDesktopSmall: [980, 1],
    itemsTablet: [768, 1],
    pagination: true,
    navigation: false,
    navigationText: ["", ""],
    autoPlay: true
})

Simple Back Button

<a href="javascript:history.go(-1)" class="custom_back_button"><i class="fas fa-chevron-left"></i> Back</a>

This example uses Font Awesome. Don’t forget to include Font Awesome lib in your functions.php

Woocommerce Order Notifications

Send an email if there are any woocommerce orders created a before the current Day.

$wp_query = new WP_Query(
    array(
        'posts_per_page'=> -1,
        'post_type'=>'shop_order',
        'post_status'=>'wc-processing',
        // 'post_status'=>'wc-completed',
        // 'post_status'=>'wc-pending',
        // 'post_status'=>'wc-canceled',
    )
);
$message = "These orders are curently processing<br>";
$confirm_mail_send = 0;   
foreach ($wp_query->posts as $order) {
        date_default_timezone_set('Africa/Johannesburg');
        $current_date = strtotime(date('Y-m-d'));
        // echo $current_date."<br>";
        
        $post_date = $order->post_date;
        $post_date_exploded = explode(' ', $post_date);
        $post_date_for_diff = strtotime($post_date_exploded[0]);
        // echo $post_date_for_diff."<br>";

        $diff =  $current_date - $post_date_for_diff;
        // echo $diff."<br>";
        
        function secondsToTime($seconds) {
            $dtF = new \DateTime('@0');
            $dtT = new \DateTime("@$seconds");
            return $dtF->diff($dtT)->format('%a days');
        }
        // echo secondsToTime($diff);
        
        if ($diff > 1) {
            $href = 'https://tjhokopaint.co.za/wp-admin/post.php?post='.($order->ID).'&action=edit'; 
            $message .= '<a href="'.$href.'">Order: '.$order->ID.'</a> ';
            $confirm_mail_send++;
            // echo "True";
        }
}
echo $message;
if ($confirm_mail_send != 0) {
    $to = 'garth@webfootprint.co.za';
    $subject = 'Pending Orders';
    $headers = array('Content-Type: text/html; charset=UTF-8');
    wp_mail( $to, $subject, $message, $headers);
}