Skip to content

Instantly share code, notes, and snippets.

View vovafeldman's full-sized avatar
🔥
Making sh*t happen

Vova Feldman vovafeldman

🔥
Making sh*t happen
View GitHub Profile
@alanef
alanef / detect_playground.php
Last active March 20, 2024 14:34
Detect WP Playground
<?php
if ( 'PHP.wasm' === $_SERVER['SERVER_SOFTWARE'] && 'playground.wordpress.net' === $_SERVER['HTTP_HOST'] ) {
// inside playground.wordpress.net
}
@shamim2883
shamim2883 / sp-edd-fs.php
Last active September 10, 2020 11:10
Redirect EDD license renew request to Freemius
<?php
add_action('add_meta_boxes', function(){
add_meta_box('sp_edd_fs_metabox', 'Freemius data', 'sp_edd_fs_metabox', 'download', 'side', 'default' );
});
function sp_edd_fs_metabox( $post ){
$plugin_id = get_post_meta( $post->ID, '_sp_edd_fs_plugin_id', true );
$coupon = get_post_meta( $post->ID, '_sp_edd_fs_coupon', true );
@lkoudal
lkoudal / freemius-checkout-button.markdown
Last active April 11, 2022 20:28
Freemius checkout button

Freemius checkout button

Inspired by James Kemp's interface - This example has tabs for monthly, annual and lifetime billing cycles.

You can choose between 1, 10 and 50 sites - each with different pricing.

There is a place to enter coupon code + user can choose between big buy button or a 7-day trial.

A Pen by Lars Koudal on CodePen.

@cyberhobo
cyberhobo / freemius-api-client.rb
Created December 19, 2016 23:09
Basis for a Ruby Freemius HTTP API client.
module Freemius
API_HOST = 'api.freemius.com'
SANDBOX_HOST = 'sandbox-api.freemius.com'
class Base
# Options taken from http://docs.freemius.apiary.io/#introduction/the-authentication-header
# * host Default is api.freemius.com
# * api_version Default is v1
# * scope_entity Default is 'plugin'. Could also be 'developer', 'install', 'site', 'user'
# * scope_entity_id Required.
@khal3d
khal3d / is_rtl.php
Last active September 15, 2022 03:26
Check if there RTL characters (Arabic, Persian, Hebrew)
<?php
/**
* Is RTL
* Check if there RTL characters (Arabic, Persian, Hebrew)
*
* @author Khaled Attia <sourcecode@khal3d.com>
* @param String $string
* @return bool
*/
@thenbrent
thenbrent / example-paypal-ipn-payloads.txt
Last active February 8, 2023 07:04
PayPal Standard & Express Checkout Subscription Related IPN Messages (from Sandbox)
-------------------------------------
PayPal Standard Subscription Sign-up
-------------------------------------
[txn_type] => subscr_signup
[subscr_id] => I-NARPL1C0KAHA
[last_name] => User
[residence_country] => US
[mc_currency] => AUD
[item_name] => Digital Subscription