Location: everywhere
Gravity Forms – Entry Count Shortcode
/** * Gravity Wiz // Gravity Forms // Entry Count Shortcode * * Extends the [gravityforms] shortcode, providing a custom action to retrieve the total entry count and * also providing the ability to retrieve counts by entry status (i.e.…Continue reading
MemberPress: Add An Email Parameter That Displays A Link To The Sub-Account Signup Page
function mepr_subaccount_email_parameter( $params, $txn ) { global $wpdb; $user = $txn->user(); $caid = get_user_meta( $user->ID, ‘mpca_corporate_account_id’, true ); if(empty( $caid ) ) { $query = $wpdb->prepare( “SELECT uuid FROM {$wpdb->prefix}mepr_corporate_accounts WHERE user_id = %d”, (int)$user->ID ); $uuid = $wpdb->get_var( $query…Continue reading
Disable OpenGraph Tags on all Listing Detail Pages
add_filter( ‘aioseo_facebook_tags’, ‘aioseo_filter_remove_facebook_tags’ ); function aioseo_filter_remove_facebook_tags( $facebookMeta ) { $uri = parse_url( $_SERVER[‘REQUEST_URI’], PHP_URL_PATH ); if ( strpos( $uri, ‘/listing-detail/’ ) !== false ) { return array(); } return $facebookMeta; }Continue reading
Remove Gutenberg Comment for Vendor Post Content
add_action( ‘save_post_vendor’, ‘clean_gutenberg_comments_on_save’, 10, 3 ); function clean_gutenberg_comments_on_save( $post_id, $post, $update ) { // Only run on updates, not when auto-saving or revisioning if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) { return; } // Ensure we’re dealing with the…Continue reading
Remove Gutenberg Comment for Vendor Post Content
add_action( ‘save_post_vendor’, ‘clean_gutenberg_comments_on_save’, 10, 3 ); function clean_gutenberg_comments_on_save( $post_id, $post, $update ) { // Only run on updates, not when auto-saving or revisioning if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) { return; } // Ensure we’re dealing with the…Continue reading
Gravity Forms: Process Multiple Image Uploads from ACF Gallery Field to User Meta in Gravity Forms
// Description: // This code snippet integrates Gravity Forms with Advanced Custom Fields (ACF) to manage multiple image uploads from the ACF vendor/venue gallery saved in user meta. Using the gform_pre_submission_filter hook, it processes multiple file uploads, converting each uploaded…Continue reading
Gravity Forms: Process Multiple Image Uploads from ACF Gallery Field to User Meta in Gravity Forms
// Description: // This code snippet integrates Gravity Forms with Advanced Custom Fields (ACF) to manage multiple image uploads from the ACF vendor/venue gallery saved in user meta. Using the gform_pre_submission_filter hook, it processes multiple file uploads, converting each uploaded…Continue reading
MemberPress: Disable Emails for Specific Memberships
function mepr_disable_membership_emails( $recipients, $subject, $message, $headers ) { if( strpos( $message, ‘Free Membership’ ) !== false ) { return null; } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’, ‘mepr_disable_membership_emails’, 10, 4 );Continue reading
MemberPress: Send Failed Transaction Notice When Admin Sets Transaction to Failed
function mepr_custom_failed_status_email( $txn ) { \MeprUtils::send_failed_txn_notices( $txn ); } add_action( ‘mepr-txn-status-failed’, ‘mepr_custom_failed_status_email’ );Continue reading