Skip to content

Instantly share code, notes, and snippets.

@deltafactory
deltafactory / fix-nextgen-lightbox-path.php
Created October 2, 2013 04:57
Fix stored URLs for Lightbox assets in NextGEN Gallery 2.x. If you find that your lightbox images are missing or are pointing to the old location for the site, then this script will help.
<?php
/*
INSTRUCTIONS:
Use at your own risk. Backup your database before continuing.
1. Copy code to a file in the root of your website.
2. Change YOUR_SITE_ROOT to a value that makes sense.
3. Execute by visiting the page. Verify before/after results.
4. Change MAKE_CHANGES_TO_SITE to true and execute it again.
@thenbrent
thenbrent / subscription-sync.php
Last active August 26, 2021 08:22
Example code to sync a subscription to a specific date. All the good parts are thanks to @peterwilsoncc, all the bad parts are my own. This is not intended to be a complete and working snippet. Instead, treat it as a guide to what needs to be changed for syncing a payment date.
<?php
/**
* Plugin Name: WooCommerce Subscriptions Date Sync
* Plugin URI:
* Description: Sets the start date of a subscription to September 13, 2013
* Author: Peter Wilson
* Author URI: http://peterwilson.cc/
* Version: 1.0.0
*/