Skip to content

Instantly share code, notes, and snippets.

View Nicholas-Cardot's full-sized avatar

Nicholas Cardot Nicholas-Cardot

  • Warfare Plugins LLC.
  • Amboy, IL
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@Nicholas-Cardot
Nicholas-Cardot / Object Needing Sorted
Created March 3, 2018 01:53
This is an example of an object which I'm trying to sort.
object(SWP_Options_Page)#542 (1) {
["tabs"]=>
&object(stdClass)#543 (4) {
["display"]=>
object(SWP_Options_Page_Tab)#544 (3) {
["name"]=>
string(7) "Display"
["priority"]=>
int(10)
["sections"]=>
@Nicholas-Cardot
Nicholas-Cardot / migration.php
Last active August 15, 2019 03:52
WooCommerce to EDD Migration Script
<?php
/*
Template Name: Migration Script
*/
error_reporting(E_ALL);
//reuire_once('/stripe/init.php');
\Stripe\Stripe::setApiKey("my_key");
@Nicholas-Cardot
Nicholas-Cardot / edd-recurring-paypal.php
Created July 17, 2017 21:37
Using a backup method for getting payments that allows for imported subscriptions
public function get_subscription( $ipn_data = array() ) {
$parent_payment_id = absint( $ipn_data['custom'] );
$backup_method = false;
// Check if we can find the payment via the internal EDD payment ID
if( !empty( $parent_payment_id ) ) {
$payment = edd_get_payment_by( 'id', $parent_payment_id );