by Garth | Jun 12, 2018 | Debugging, PHP, Wordpress
So today a client’s site that had its WordPress version updated (to 4.9.1) started throwing this error when they tried to use the Metaslider plugin to upload new images. Some searching confirmed this was happening to more than a few other people but I did not easily...
by Garth | Jun 5, 2018 | PHP, Snippets, Tools, Woocommerce, Wordpress
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’,...
by Garth | May 31, 2018 | PHP, Snippets, Wordpress
Use your discretion and adjust the function as you need it. It should make sense when you read the function. It currently sets a shipping fee based on the total cost of the cart. // ADD SHIPPING COST function woo_add_cart_fee() { if...
by Garth | May 21, 2018 | PHP, Wordpress
Calling your Query While or Foreach While <?php $query = new WP_Query($args); ?> <?php while ( $query->have_posts() ) : the_post(); ?> <div> <?php $query->the_post(); get_template_part( ‘content’, get_post_format() ); ?>...
by Garth | May 18, 2018 | PHP, Plugins, Wordpress
This post requires developer discretion. The file names are written as an example for this post. As long as you make sure your files are been linked up correctly, you can name your files whatever you like. There’s loads of comments to help you along the way. You...
by Garth | May 18, 2018 | PHP, Wordpress
function my_admin_menu() { $page_title = ‘Clear Stock’; $menu_title = ‘Clear Stock’; $capability = ‘manage_options’; $menu_slug = ‘/clear_stock’; $function = ‘clear_stock’; $icon_url = ”; $position =...