Skip to content

Instantly share code, notes, and snippets.

View ramiabraham's full-sized avatar

Rami Abraham ramiabraham

View GitHub Profile
@ramiabraham
ramiabraham / rcp_add_affwp_affiliate_at_rcp_sub.php
Last active May 11, 2022 04:16
Add AffiliateWP affiliate when RCP subscription occurs (requires specifying desired RCP action, and subscription).
<?php
function rcp_add_affwp_affiliate_at_rcp_sub() {
$user_info = get_userdata();
$user_id = $user_info->user_id;
$member = new RCP_Member( $user_id );
$subscription_id = $member->get_pending_subscription_id();
@ramiabraham
ramiabraham / blender_belt_sander.md
Last active August 18, 2016 01:01
How to make a belt sander using an electric blender
We couldn’t find that file to show.
$categories = get_categories( array(
'orderby' => 'name',
'parent' => 0,
'post_type' => 'orange_cats'
) );
echo 'Shows all taxonomies for the given post type:';
echo '<br />';
foreach ( $categories as $category ) {
<?php
/*
Plugin Name: Orange Cats 4U
Plugin URI: https://catfacts.com
Description: Orange cats. For you!
Version: 1.0
Author: Helena Bonham Carter
Author URI: https://dennys.com
Copyright: ok
Text Domain: orange-cats
@ramiabraham
ramiabraham / affwp-custom-store-credit-dashboard.php
Created August 11, 2016 01:05
Change the notice in the affiliate dashboard for store credit balances.
<?php
/**
* Plugin Name: AffiliateWP - Store Credit Custom Dashboard Notice
* Plugin URI: http://affiliatewp.com
* Description: Change the notice in the affiliate dashboard for store credit balances.
* Author: ramiabraham
* Author URI: http://affiliatewp.com
* Version: 1.0
*/
function affwp_custom_store_credit_dashboard_notice() {
<?php
/**
* Plugin Name: AffiliateWP - Email Affiliate When Referral Paid
* Plugin URI: http://affiliatewp.com
* Description: Sends an email to the affiliate when a referral has been paid
* Author: Andrew Munro
* Author URI: http://affiliatewp.com
* Version: 1.0
*/
@ramiabraham
ramiabraham / sysinfo.sh
Created July 27, 2016 15:15
Unix OS system config info command reference
# Lists the following:
# kernel name, network node hostname,
# kernel release, kernel version,
# machine hardware name, processor type,
# hardware platform, operating system
uname –a
# whether your system is 32-bit or 64-bit
uname -m
@ramiabraham
ramiabraham / README.md
Last active April 13, 2023 15:17
Get all public gists by EAL; https://gist.github.com/ericandrewlewis.
@ramiabraham
ramiabraham / affwp_custom_first_referral_only.php
Last active July 19, 2016 21:09
Give affiliates one single referral only.
<?php
/**
* Plugin Name: AffiliateWP - First Referral Commission Only
* Plugin URI: https://affiliatewp.com
* Description: Modify an affiliate's commission rate for their very first referral. All other subsequent referrals will be recorded at zero.
* Author: ramiabraham
* Author URI: https://affiliatewp.com
* Version: 1.0
*/
@ramiabraham
ramiabraham / affwp_custom_meta_box_example.php
Last active May 11, 2022 04:51
AffWP Custom Meta Box Example
<?php
/**
* Plugin Name: AffWP Custom Meta Box Example
* Plugin URI: https://affiliatewp.com
* Description: AffWP Custom Meta Box Example
* Author: AffiliateWP, LLC
* Author URI: https://affiliatewp.com
* Version: 1.0
* Text Domain: affwp-custom-meta-box-example
* */