FES Login Form Redirect

function custom_fes_login_redirect( $response, $userdata ) { $response[‘redirect_to’] = ‘http://google.com/’; return $response; } add_filter( ‘fes_login_form_success_redirect’, ‘custom_fes_login_redirect’, 10, 2 );Continue reading

Vendor Canonical Links

function jp_maybe_fix_canonical() { if ( get_query_var( ‘vendor’ ) ) { remove_action( ‘wp_head’, ‘rel_canonical’ ); add_action( ‘wp_head’, ‘jp_fix_canonical’ ); } } add_action( ‘template_redirect’, ‘jp_maybe_fix_canonical’ ); function jp_fix_canonical() { $link = home_url( ‘vendor/’ ); if ( $vendor = get_query_var( ‘vendor’ ) )…Continue reading

Remove aggregateRating schema when review schema is missing

add_filter( ‘aioseo_schema_output’, ‘product_schema_remove_aggregate’ ); function product_schema_remove_aggregate( $schema ) { foreach ( $schema as &$schemaItem ) { if ( ‘Product’ === $schemaItem[‘@type’] ) { if(!isset($schemaItem[‘review’])){ unset ($schemaItem[‘aggregateRating’]); } } } return $schema; }Continue reading

Translate Products

function my_custom_fes_product_constant_plural_uppercase( $products_name ){ return ‘Products’; // Replace this with your languages word for “Products” } add_filter( ‘fes_product_constant_plural_uppercase’, ‘my_custom_fes_product_constant_plural_uppercase’ ); function my_custom_fes_product_constant_plural_lowercase( $products_name ){ return ‘products’; // Replace this with your languages word for “products” } add_filter( ‘fes_product_constant_plural_lowercase’, ‘my_custom_fes_product_constant_plural_lowercase’ );…Continue reading

FES Registration Form Redirect

function custom_fes_vendor_registration_redirect( $response, $post_id, $form_id ) { // replace http://google.com/ with your desired redirect URL $response[‘redirect_to’] = ‘http://google.com/’; return $response; } add_filter( ‘fes_register_form_pending_vendor’, ‘custom_fes_vendor_registration_redirect’, 10, 3 ); add_filter( ‘fes_register_form_frontend_vendor’, ‘custom_fes_vendor_registration_redirect’, 10, 3 );Continue reading

Change Vendor Delete Product Redirect

function kjm_change_vendor_delete_product_redirect() { $redirect_to = get_permalink( EDD_FES()->helper->get_option( ‘fes-vendor-dashboard-page’, false ) ); $redirect_to = add_query_arg( array( ‘task’ => ‘products’ ), $redirect_to ); wp_redirect( $redirect_to ); exit; } add_action( ‘fes_vendor_delete_product’, ‘kjm_change_vendor_delete_product_redirect’ );Continue reading

Add FES Vendor Dashboard Tab

// add the tab item itself function custom_vendor_dashboard_menu( $menu_items ) { $menu_items[‘tab_name’] = array( “icon” => “earnings”, “task” => array( ‘tab_name’ ), “name” => __( ‘Tab Name’, ‘edd_fes’ ), // the text that appears on the tab ); return $menu_items;…Continue reading

Add Wallet Deposit Levels

function custom_wallet_desposit_levels( $levels ) { // add comma-separated deposit levels to default list // 2000 and 5000 are dollar value examples – adjust as needed $more_levels = array( ‘2000’, ‘5000’ ); return array_merge( $levels, $more_levels ); } add_filter( ‘edd_wallet_deposit_levels’, ‘custom_wallet_desposit_levels’…Continue reading