This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Update site to use test mode in local and staging environments | |
*/ | |
function prefix_env_settings() { | |
// If settings have already been updated, return early | |
if ( 1 == get_transient( 'staging-settings-updated' ) ) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Update site to use test mode in local and staging environments | |
*/ | |
function prefix_env_settings() { | |
// If settings have already been updated, return early | |
if ( 1 == get_transient( 'staging-settings-updated' ) ) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function gens_send_email($user_id,$coupon_code) { | |
if ( !$user_id || !$coupon_code) { | |
return false; | |
} | |
global $woocommerce; | |
$mailer = $woocommerce->mailer(); | |
$user_info = get_userdata($user_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Filter WooCommerce Orders by Payment Method | |
* Plugin URI: http://skyverge.com/ | |
* Description: Filters WooCommerce orders by the payment method used :) | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com/ | |
* Version: 1.0.0 | |
* Text Domain: wc-filter-orders-by-payment | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USEFUL PLESK COMMANDS | |
# restart plesk | |
/etc/init.d/psa restart | |
# reload plesk configs (useful for vhost.conf) | |
/usr/local/psa/admin/sbin/websrvmng -a -v | |
# restart qmail | |
service qmail restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |