WP Simple Pay: Programmatically Access Payment Metadata After Payment

/** * @link https://library.wpcode.com/snippet/3234p8or/ * * @param StripeEvent $event Stripe Event. * @param StripeSubscription|StripePaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_custom_create_user( $event, $object ) { $metadata = $object->metadata->toArray(); // Access a custom field with a “Stripe Metadata Label” of…Continue reading

WP Simple Pay: Add More Aggressive Rate Limiting

/** * @link https://library.wpcode.com/snippet/r5p3r9o8/ */ /** * Lower the number of requests allowed for the set timeframe to 3 (default 5). */ add_filter( ‘simpay_rate_limiting_max_rate_count’, /** * @return int The number of requests that can be made in the timeframe. */…Continue reading

FD Mitarbeiter Vorname Name als Titel übernehmen

function sync_acf_post_title($post_id, $post, $update) { $acf_name = get_field(‘name’, $post_id); // Get the value of the “name” ACF field $acf_vorname = get_field(‘vorname’, $post_id); // Get the value of the “vorname” ACF field $post_type = get_post_type($post_id); if ($acf_name && $post_type === “mitarbeiterinnen”)…Continue reading

Hide user account from the users list

//* Hide this administrator account from the users list add_action(‘pre_user_query’,’site_pre_user_query’); function site_pre_user_query($user_search) { global $current_user; $username = $current_user->user_login; if ($username == ‘mediAdmin’) { } else { global $wpdb; $user_search->query_where = str_replace(‘WHERE 1=1’, “WHERE 1=1 AND {$wpdb->users}.user_login != ‘mediAdmin’”,$user_search->query_where); } }Continue reading