Archives: Snippets
MemberPress: Assigning BuddyPress Member Type on Membership Signup
add_action(‘mepr-event-member-signup-completed’, function($event) { $user = $event->get_data(); bp_set_member_type($user->ID, ‘member_type’); });Continue reading
chellesbakes
Remove “No Reviews” label if there are not reviews in Tasty Recipes
function tasty_recipes_remove_no_reviews_label( $content ) { global $post; if ( ! $post ) { return $content; } $post_id = $post->ID; $has_recipe = \Tasty_Recipes::has_recipe( $post_id ); if ( ! $has_recipe ) { return $content; } $recipe_id = \Tasty_Recipes::get_recipe_ids_for_post( $post_id )[0]; $recipe =…Continue reading
Clamp Text size for Elementor
h1 {font-size: clamp(1.8125rem, 1.05328rem + 3.19672vw, 4.25rem);} h2 {font-size: clamp(1.5rem, 0.97439rem + 2.21311vw, 3.1875rem);} h3 {font-size: clamp(1.25rem, 0.89959rem + 1.47541vw, 2.375rem);} h4 {font-size: clamp(1.0625rem, 0.82889rem + 0.98361vw, 1.8125rem);} h5 {font-size: clamp(0.875rem, 0.71926rem + 0.65574vw, 1.375rem);} h6 {font-size: clamp(0.75rem, 0.67213rem +…Continue reading
https://sites.google.com/d/1avAsGl7oMBLJIChoaW9yaoOiAr-B6jfK/p/1kbx8BATlg53-QAVM9O8IXHJhuAw0qg1E/
https://sites.google.com/d/1avAsGl7oMBLJIChoaW9yaoOiAr-B6jfK/p/1kbx8BATlg53-QAVM9O8IXHJhuAw0qg1E/Continue reading
Untitled Snippet
MemberPress: Change Stripe Checkout fields to match Dark Mode theme
add_filter( ‘mepr-stripe-elements-appearance’, function( $style ) { $style[ ‘theme’ ] = ‘night’; return $style; });Continue reading
MemberPress: Change VAT “Customer” Type Label Text to “Business (Non VAT Registered)”
function change_vat_customer_type_label() { ?>Continue reading
MemberPress: Restrict Email Patterns for Specific Memberships
function mepr_restrict_email_patterns_for_specific_plans($errors) { // Define the patterns to search for in email addresses $blocked_email_patterns = array( ‘xxx@gmail’, ‘xyz@’, ‘test@test’ ); // Define specific subscription plan IDs that require email restriction $restricted_plan_ids = array( 123, 456 ); // Replace with actual…Continue reading