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 | |
/** | |
* Disable all sales. | |
* | |
* A simple function to disable all the sales in the shop. | |
* Uncomment the line of code to disable the sale price on products. | |
*/ | |
function custom_wc_get_sale_price( $sale_price, $product ) { |
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: PMPro Customizations | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Custom Prorating Code and Other Code for PMPro | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ |
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
/* | |
Set levels as "all access levels" so members of these levels will be able to view all Addon Packages. | |
Requires Paid Memberships Pro and the pmpro-addon-packages plugin. | |
*/ | |
function my_pmproap_all_access_levels($levels, $user_id, $post_id) | |
{ | |
//I'm just adding the level, but I could do some calculation based on the user and post id to programatically give access to content | |
$levels = array(16); | |
return $levels; | |
} |
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
/* | |
Only let level 1 members sign up if they use a discount code. | |
Place this code in your active theme's functions.php or a custom plugin. | |
*/ | |
function my_pmpro_registration_checks_require_code_to_register($pmpro_continue_registration) | |
{ | |
//only bother if things are okay so far | |
if(!$pmpro_continue_registration) | |
return $pmpro_continue_registration; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Wistia Upload Widget via API </title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<style> | |
#wistia { width: 500px; height: 75px; } | |
</style> | |
</head> | |
<body> |
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 | |
// This will dump information about all plans the currently signed in member has access to | |
var_dump(memberful_wp_user_plans_subscribed_to(wp_get_current_user()->ID)); | |
// This will print all downloads the currently signed in member has access to, including those granted by a subscription | |
var_dump(memberful_wp_user_downloads( wp_get_current_user()->ID )); | |
// You can also pass the id of a specific user to get the plans for that specific user. E.g |
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 | |
/** | |
* Custom Add To Cart Messages | |
* Add this to your theme functions.php file | |
**/ | |
add_filter( 'woocommerce_add_to_cart_message', 'custom_add_to_cart_message' ); | |
function custom_add_to_cart_message() { | |
global $woocommerce; | |
// Output success messages |
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: Fix bbPress roles for s2member | |
Plugin URI: http://roughsmootheng.in | |
Version: 1.0 | |
Description: This plugin adds s2member roles to the user_role_map for bbPress. | |
Author: Darren Ethier | |
Author URI: http://www.roughsmootheng.in | |
*/ |
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 | |
/** | |
* Database emtpying and file removing class. | |
* | |
* Truncates all necessary tables in the defined database and removes | |
* any files uploaded by the demo user. | |
* | |
* @since 1.0.0 | |
* | |
* @author Thomas Griffin |
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: PMPro Shipping | |
Plugin URI: https://gist.github.com/gists/1894897/ | |
Description: Add shipping to the checkout page and other updates. | |
Version: .2.1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
Note that this plugin requires PMPro 1.3.19 or higher to function fully. |
NewerOlder