Skip to content

Instantly share code, notes, and snippets.

@allycspf
allycspf / custom.php
Created December 21, 2021 12:50
Add custom data to Stripe Customer metadata
<?php
add_filter('mepr_stripe_create_customer_args', function ($args, $usr) {
$args['metadata']['language'] = 'French';
return $args;
}, 10, 2);
@allycspf
allycspf / custom.php
Created September 16, 2020 11:16
MemberPress Override Stripe Statement Descriptor
add_filter('mepr_stripe_statement_descriptor', function($descriptor, $product) {
return 'Custom Descriptor';
}, 10, 2);
@allycspf
allycspf / debugging.php
Created October 8, 2019 15:37
Pretty Links query debugging plugin
<?php
/*
* Plugin Name: Pretty Links Debugging
* Description: Debugging plugin for Pretty Links.
*/
add_filter('posts_results', function ($posts, $query) {
if (is_admin() && class_exists('PrliUtils') && isset($query->query['post_type']) && $query->query['post_type'] == 'pretty-link') {
ob_start();