MemberPress: Set Default Country on Registration Page
function mepr_set_default_country_script() { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function mepr_set_default_country_script() { ?>Continue reading
function replace_text_in_price_box() { ?>Continue reading
add_action( ‘wp_footer’, function() { ?>Continue reading
function exclude_protected_memberpress_posts( $query ) { // Ensure we are not in the admin area and it’s the main query if ( ! is_admin() && $query->is_main_query() ) { // Check if we are on the repeater field context if ( function_exists(…Continue reading
function mepr_load_mp_styles() { wp_enqueue_style( ‘mepr-moove_gdpr_frontend’, ‘https://your-domain.com/path/to/your/gdpr-stylesheet.css’, array(), ‘4.15.0’ ); } // Add the action to enqueue the GDPR stylesheet on the frontend add_action( ‘wp_enqueue_scripts’, ‘mepr_load_mp_styles’ );Continue reading
function trigger_flowmattic_action_on_landing() { // Check if the user is logged in if ( is_user_logged_in() ) { // Get the current user’s ID $user_id = get_current_user_id(); // Prepare the data to be passed to the workflow $data_to_pass = array( ‘user_id’ =>…Continue reading
if( function_exists(‘acf_add_options_page’) ) { acf_add_options_page(); } // // 1. Register ACF Field for Menu JSON add_action(‘acf/init’, function() { if( function_exists(‘acf_add_local_field_group’) ) { acf_add_local_field_group(array( ‘key’ => ‘group_menu_json_import’, ‘title’ => ‘Menu Import’, ‘fields’ => array( array( ‘key’ => ‘field_menu_json’, ‘label’ => ‘Menu…Continue reading
add_filter( ‘simpay_payment_confirmation_template_tag_card-last4’, function( $value, $payment_confirmation_data ) { if ( isset( $payment_confirmation_data[‘checkout_session’] ) && ! isset( $payment_confirmation_data[‘subscription’] ) ) { $paymentintent = \SimplePay\Core\API\PaymentIntents\retrieve( array( ‘id’ => $payment_confirmation_data[‘checkout_session’]->payment_intent, ‘expand’ => array( ‘latest_charge’, ), ), $payment_confirmation_data[‘form’]->get_api_request_args() ); $card = $paymentintent->latest_charge->payment_method_details->card; return $card->last4; }…Continue reading
add_action(‘wp’, function() { if (is_single() && !is_admin()) { remove_action(‘virtue_page_title_container’, ‘virtue_page_title’, 20); } });Continue reading
// Author: Sumaiya, Clickup Doc : https://app.clickup.com/36636088/v/dc/12y1dr-22535/12y1dr-24415 add_action(‘wp_ajax_fetch_quiz_data’, ‘fetch_quiz_data’); add_action(‘wp_ajax_nopriv_fetch_quiz_data’, ‘fetch_quiz_data’); // For non-logged in users function get_quiz_data($quiz_id) { global $wpdb; // Sanitize the quiz ID to prevent SQL injection and other security issues. $quiz_id = sanitize_text_field($quiz_id); $table_name = ‘quiz_answers’;…Continue reading