Skip to content

Instantly share code, notes, and snippets.

@KoolPal
KoolPal / tracking-info-to-wc-order.php
Created February 21, 2020 06:39 — forked from damiencarbery/add-an-post-tracking-provider.php
Tracking Info to WooCommerce order - Use CMB2 to add a custom metabox to add tracking information to WooCommerce orders. The information is then added to the "Completed Order" email. https://www.damiencarbery.com/2020/01/add-tracking-info-to-woocommerce-order/
<?php
/*
Plugin Name: Tracking Info to WooCommerce order
Plugin URI: https://www.damiencarbery.com/2020/01/add-tracking-info-to-woocommerce-order/
Description: Use CMB2 to add a custom metabox to add tracking information to WooCommerce orders. The information is then added to the "Completed Order" email.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.2
$Id: tracking-info-to-wc-order.php 4947 2020-01-04 14:52:28Z damien $
<?php
rs::metabox(array(
'title' => 'Select custom date sale',
'layout' => 'none',
'rules' => array(
'post_type' => 'product'
),
'context' => 'normal',
'priority' => 'default',
'controls' => array(
@KoolPal
KoolPal / wordpress_functions.php
Created February 21, 2020 06:41 — forked from jetfire21/wordpress_functions.php
wordpress functions
<?php
########### wp replace url in DB #############
1
http://dugoodr.com
http://dugoodr2.dev
2
/home/dugoodr6/public_html/
/home/jetfire/www/dugoodr2.dev/
@KoolPal
KoolPal / metabox-multiple.php
Created February 21, 2020 07:38 — forked from cferdinandi/metabox-multiple.php
Create a metabox with multiple fields
<?php
/**
* Create a metabox with multiple fields.
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items
*/
//
// Create Metabox
//
@KoolPal
KoolPal / custom-note-to-order-email.php
Created February 22, 2020 05:05 — forked from damiencarbery/custom-note-to-order-email.php
Add info to WooCommerce order emails -
<?php
/*
Plugin Name: Custom note to order email
Plugin URI: https://www.damiencarbery.com/2018/07/add-info-to-woocommerce-order-emails/
Description: Add a note to the order email if the order contains products from the specified category.
Author: Damien Carbery
Version: 0.1
*/
/* Add note about shapetrousers delivery time to the order email. */
@KoolPal
KoolPal / inject-ad-content.php
Created February 22, 2020 05:17 — forked from damiencarbery/inject-ad-content.php
Inject Adverts into Posts and Pages - Inject a specified page or widget area into post or page content. https://www.damiencarbery.com/2019/09/inject-adverts-into-posts-and-pages/
<?php
/*
Plugin Name: Inject Adverts into Posts and Pages
Plugin URI: https://www.damiencarbery.com/2019/09/inject-adverts-into-posts-and-pages/
Description: Inject a specified page or widget area into post or page content.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
@KoolPal
KoolPal / htaccess-root.txt
Created February 22, 2020 05:19 — forked from damiencarbery/htaccess-root.txt
Hardening and Caching WordPress - A few .htaccess and wp-config.php changes to harden and speed up your website. These are simple changes that can help protect you - https://www.damiencarbery.com/2019/03/hardening-and-caching-wordpress/
# Block WordPress xmlrpc.php requests.
<Files xmlrpc.php>
deny from all
</Files>
# Block direct access to wp-config.php.
<Files wp-config.php>
Deny from all
</Files>
@KoolPal
KoolPal / send-emails-via-smtp.php
Created February 22, 2020 05:20 — forked from damiencarbery/send-emails-via-smtp.php
Sent WordPress emails with SMTP - Deliver emails reliably by using SMTP. Use a tiny streamlined plugin to keep things fast. https://www.damiencarbery.com/2019/01/send-wordpress-emails-with-smtp/
<?php
/*
Plugin Name: Send email via SMTP
Plugin URI: https://www.damiencarbery.com/2019/01/send-wordpress-emails-with-smtp/
Description: Send emails via SMTP.
Author: Damien Carbery
Version: 0.1
*/
<?php
/*
Plugin Name: Move Variations above Short Description
Plugin URI: https://www.facebook.com/groups/advanced.woocommerce/permalink/2114573521890389/
Description: Move the variations and Add to Cart to be above the short description.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.1
*/
@KoolPal
KoolPal / disable-cf7.php
Created February 22, 2020 06:04 — forked from damiencarbery/disable-cf7.php
Disable Contact Form 7 plugin except for certain pages.
<?php
/*
Plugin Name: Disable CF7 plugin
Plugin URI: http://www.damiencarbery.com
Description: Disable Contact Form 7 plugin except for certain pages.
Author: Damien Carbery
Version: $Revision: $
$Id: $
*/