Skip to content

Instantly share code, notes, and snippets.

View hiddenpearls's full-sized avatar
🏁
About to reach my GOAL

Adnan hiddenpearls

🏁
About to reach my GOAL
View GitHub Profile
<?php
/*
Plugin Name: EDD Webhooks
Description: Captures new sale notifications from 3rd party service and adds to Easy Digital Downloads
Version: 1.0
Author: Brian Hogg
Author URI: https://brianhogg.com
Text Domain: edd-webhooks
License: GPL2
*/
@hiddenpearls
hiddenpearls / shortcode.html
Last active August 15, 2023 13:10
Analytify dashboard sections on frontend as shortcodes
<style>
.analytify_status_box_wraper {
border: 1px solid #e2e5e8;
margin-bottom: 20px;
background: #fff;
line-height: 1.5;
font-family: 'Roboto', sans-serif;
color: #848484;
font-size: 14px;
}
@hiddenpearls
hiddenpearls / check-edd-license
Created June 19, 2018 14:23
Check EDD License status
/**
* Check and get the license data.
*
* @param string $license The license key.
*
* @return false|array
*/
public static function check_license( $license ) {
$license = trim( $license );
@hiddenpearls
hiddenpearls / canceled-subscriptions.sql
Created January 24, 2022 21:22 — forked from webzunft/canceled-subscriptions.sql
SQL queries to analyse canceled subscriptions managed with EDD Recurring Payments
# Basic queries to analyse canceled subscriptions using EDD Recurring Payments pre EDD 3.0
# Use EXPLAIN if you have large stores since the "notes" column is not indexed and queries can take some time
# Some of these reports might be worth storing as Views and look at the graphs PHPMyAdmin can also create from them
# List subscription cancelation with creation and cancelation date, as well as the user who canceled
# good as a basis for further queries
SELECT ID,
created,
REGEXP_SUBSTR( REGEXP_SUBSTR( notes, '.* Status changed from active to cancelled .*' ), '^[a-z]+ [0-9]+, [0-9]+' ) AS 'date',