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 | |
/** | |
* Shortcodes that help with displaying pricing information | |
*/ | |
/** | |
* Show the original price of a given download and price ID | |
* | |
* @param array $atts shortcode attributes. | |
* @param array $content shortcode attributes. |
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
# 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', |
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 | |
/** | |
* Add more columns to the order table | |
* | |
* - Products | |
* - Country | |
*/ | |
/** | |
* Add table columns | |
* |
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: ISC Options Printer | |
* Plugin URI: https://yourwebsite.com/ | |
* Description: A helper plugin to print the Image Source Control plugin options in raw, serialized format at the top of the ISC plugin options page. | |
* Version: 1.0 | |
* Author: Your Name | |
* Author URI: https://yourwebsite.com/ | |
* License: GPL2 | |
*/ |
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
<div style="min-width: 300px; height: auto; padding: 10px; background: #fff; color: #333; text-align: center; border: solid 1px #ddd;"> | |
<p>Your location:</p> | |
<?php | |
if( class_exists( 'Advanced_Ads_Geo_Api' ) ) : | |
$api = Advanced_Ads_Geo_Api::get_instance(); | |
$ip = $api->get_real_IP_address(); | |
$error = false; | |
$my_country = ''; | |
$my_country_isoCode = ''; | |
$my_city = ''; |
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
/** | |
* Tracking order items and orders for Easy Digital Downloads as Ecommerce data in a self-hosted Matomo (the WordPress plugin) | |
* the code is fired on the purchase confirmation page that appears right after the purchase. | |
* Based on https://matomo.org/faq/reports/advanced-manually-tracking-ecommerce-actions-in-matomo/ | |
*/ | |
add_action('edd_order_receipt_after_table', function( $order, $edd_receipt_args ) { | |
if ( empty( $edd_receipt_args['payment_id'] ) ) { | |
return; | |
} | |
// Only accept complete or pending orders. Pending orders can be caused by a delay with PayPal, so we are accepting them here |
OlderNewer