Lookup up current user’s fw_exp_date on My Profile page

// Create Ajax handler // add_action(‘wp_ajax_get_fw_exp_date’, ‘get_fw_exp_date_callback’); function get_fw_exp_date_callback() { /* if (!is_user_logged_in()) { echo ‘Not logged in’; wp_die(); } */ $fw_user_id = get_current_user_id(); $get_fw_exp_date = get_user_meta($fw_user_id, ‘fw_exp_date’, true); if ($get_fw_exp_date) { // Convert YYYY-MM-DD to MM/DD/YYYY $date_obj = DateTime::createFromFormat(‘Y-m-d’,…Continue reading

Require Minimum Characters for Username

/** * Name: fw_minimumAccountUsernameChars (“fw” indicates “FreeWheelers”) * Desc: Require the account username be at least 8 characters **/ add_filter(‘frm_validate_field_entry’, ‘fw_minimumAccountUsernameChars’, 10, 3); function fw_minimumAccountUsernameChars( $errors, $field, $posted_value ){ if ( $field->id == MEMBER_REGISTRATION_USER_NAME_FIELD_ID ) { $minimum = 8; if…Continue reading

Global – FacetWP

/** Adds script to header ** Scroll to top of page – only on Pager facet interaction ** For more info see: ** https://facetwp.com/help-center/facets/facet-types/pager/#how-to-add-pagination-scrolling **/ add_action( ‘wp_head’, function() { ?>Continue reading

Global – FacetWP

/** Adds script to header ** Scroll to top of page – only on Pager facet interaction ** For more info see: ** https://facetwp.com/help-center/facets/facet-types/pager/#how-to-add-pagination-scrolling **/ add_action( ‘wp_head’, function() { ?>Continue reading

Single product – Add shop RankMath breadcrumbs

add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) { //Adding to single products // change to match the post type name $value[] = array( ‘Shop’, // change to the actual name shown on the frontend ‘/shop/’, // change to the actual URL…Continue reading