Skip to content

Instantly share code, notes, and snippets.

@rocketgeek
rocketgeek / snippet.php
Created July 15, 2024 20:02
Membership renew direct to checkout
<?php // do not include this line.
add_filter( 'wpmem_wc_renew_url', function( $url, $product_id, $key ) {
global $woocommerce;
$url = $woocommerce->cart->get_checkout_url();
return $url;
}, 10, 3 );
@rocketgeek
rocketgeek / api-email.php
Created November 1, 2024 14:46
potential bug fix for wpmem_mail_content_type()
<?php
/**
* WP-Members Email API Functions
*
* This file is part of the WP-Members plugin by Chad Butler
* You can find out more about this plugin at https://rocketgeek.com
* Copyright (c) 2006-2023 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
*
* @package WP-Members
@rocketgeek
rocketgeek / class-wp-members-admin-tab-fields.php
Last active December 5, 2024 14:31
A temporary patch for WP-Members to overcome bulk action submit compatibility issue with WP 6.7
<?php
/**
* WP-Members Admin Functions
*
* Functions to manage the fields tab.
*
* This file is part of the WP-Members plugin by Chad Butler
* You can find out more about this plugin at https://rocketgeek.com
* Copyright (c) 2006-2023 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
@rocketgeek
rocketgeek / api-email.php
Last active December 8, 2024 20:21
email content type patch for use with Advanced Options
<?php
// Patch file replaces wp-members/includes/api/api-email.php in WP-Members 3.4.9.x.
/**
* WP-Members Email API Functions
*
* This file is part of the WP-Members plugin by Chad Butler
* You can find out more about this plugin at https://rocketgeek.com
* Copyright (c) 2006-2023 Chad Butler
* WP-Members(tm) is a trademark of butlerblog.com
*
@rocketgeek
rocketgeek / class-wp-members-admin-tab-fields.php
Last active January 30, 2025 14:52
WP-Members 3.5.0 patch files
<?php
/**
Replaces wp-members/includes/admin/tabs/class-wp-members-admin-tab-fields.php
Patches included:
* fixes bug in 3.5.0 that causes radio/multicheckbox textarea input to show on select/multiselect edit view (and vice versa)
* code improvement to clean whitespace from radio/multicheckbox/select/multiselect input values
*/