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
# For get_user_meta: replace the function name, argument order & make sure no default value (3rd parameter) is passed to the get_user_option function | |
# FIND: | |
get_user_meta\(\s?(.*?),\s?([^,\)\s]*)\s?(,(.*?))?\) | |
# REPLACE: | |
get_user_option( $2, $1 ) | |
# For update_user_meta: replace the function name & don't carry over the 4th $prev_value argument |
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
WP_Rewrite Object ( | |
[permalink_structure] => /%postname%/ | |
[use_trailing_slashes] => 1 | |
[author_base] => author | |
[search_base] => search | |
[comments_base] => comments | |
[pagination_base] => page | |
[feed_base] => feed | |
[comments_feed_structure] => | |
[front] => / |
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
[rules] => Array ( | |
[category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
[category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
[category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2] | |
[category/(.+?)/?$] => index.php?category_name=$matches[1] | |
[tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
[tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
[tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2] | |
[tag/([^/]+)/?$] => index.php?tag=$matches[1] | |
[type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2] |
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 | |
/** | |
* Customise the messsages for all custom post types in a WordPress install. | |
* | |
* @author Brent Shepherd <brent@findingsimple.com> | |
* @package eg | |
* @subpackage CPT | |
* @since 1.0 | |
*/ | |
function eg_cpt_update_messages( $messages ) { |
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
#! /bin/bash | |
# Drop the existing content of a database and replace it with a backup | |
DBUSER="root" | |
DBPASS="root" | |
DBNAME="INSERT-DB-NAME" | |
IMPORTFILE="$DBNAME.sql" | |
echo ".........................................." | |
echo -e " Enter the name of the DB backup (with extension): \c" |
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 | |
$subscription_keys = array( '285_139', '304_108' ); | |
foreach ( $subscription_keys as $subscription_key ) { | |
$user_id = 2; | |
error_log('----'); |
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
jQuery(document).ready(function($){ | |
$('.payment_methods input.input-radio').die('click'); | |
}); |
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: Test Plugin | |
* Description: Test plugins and themes. | |
* Author: Brent Shepherd | |
* Version: 1.0 | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
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
WooCommerce Subscriptions version 1.2 changes: | |
* Support for sale prices on subscription products | |
* On the Manage Subscriptions page, store managers can now search for subscriptions by subscriber username, email, order ID, product ID or subscription item name (subscription product name at time of purchase) | |
* Any payment gateway with a WooCommerce extension can now be used to purchase and renew subscriptions via manual payments | |
* Subscribers can now use a different payment method for each recurring payment via manual payments | |
* Subscribers can now change the payment method on a subscription if an automatic payments fails | |
* A subscription's next payment date can now be changed if the payment gateways used to purchased it can change the date | |
* WooCommerce reports now include revenue from subscription's recurring payments | |
* Improved record keeping for recurring subscription payments with a renewal order created for each payment | |
* Improved shipping management for subscriptions with physical goods through |
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
Find line #192 of class-wc-subscriptions-coupon.php which is currently this: | |
if( ! 'recurring_fee' == $coupon->type || ! 'sign_up_fee' == $coupon->type ) | |
and replace it with this: | |
if( ! in_array( $coupon->type, array( 'recurring_fee', 'sign_up_fee' ) ) ) |