• uplupl

    (@uplupl)


    Hi all,
    Is it possible to have the wishlist specific url (ending with view/KABYY4UT3X/) included in contact form 7?

    We need to send it by email included as part of the email that CF7 sends.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter uplupl

    (@uplupl)

    anyone that can help me with this?

    I simply need to send the specific url with the token https://www.domain.com/wishlist/view/KABYY4UT3X/

    through contact form 7 email.

    • This reply was modified 7 years ago by uplupl.
    Plugin Author YITHEMES

    (@yithemes)

    Hi there

    Retrieving complete wishlist url is more complex then it may appear ??
    This can only be done via code, and will only work for logged in users’ wishlists

    First of all, you’ll need a referece to the wishlist that you want to use to calculate url

    I suppose you’re using the free version of the plugin, so the url should be calculated for user’s default list; so you could use the following code to retrieve url

    
    function yith_wcwl_default_wishlist_url(){
    	if( ! is_user_logged_in() || ! function_exists( 'YITH_WCWL' ) ){
    		return false;
    	}
    
    	$default_list_id = YITH_WCWL()->generate_default_wishlist( get_current_user_id() );
    	$default_list = YITH_WCWL()->get_wishlist_detail( $default_list_id );
    
    	return YITH_WCWL()->get_wishlist_url( 'view/' . $default_list['wishlist_token'] );
    }
    

    Maybe you could use this function as a callback of a shortcode, and use that shortcode in CF7 content

    Hi Uplupl

    Did you come right with this? I need exactly the same functionality. Or anyone?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wishlist specific URL in Contact Form 7’ is closed to new replies.