In ProgressRetrieve the page from which I open the quickview

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23720
    mediamix
    Participant

    if i add this code in themes/lafka/woocommerce/content-single-product-lafka-quickview.php

    global $wp_query;
    error_log(print_r($wp_query,true)); 

    see this

    [18-Jun-2020 16:50:04 UTC] WP_Query Object
    (
        [query] => 
        [query_vars] => Array
            (
            )
        [tax_query] => 
        [meta_query] => 
        [date_query] => 
        [queried_object] => 
        [queried_object_id] => 
        [request] => 
        [posts] => 
        [post_count] => 0
        [current_post] => -1
        [in_the_loop] => 
        [post] => 
        [comments] => 
        [comment_count] => 0
        [current_comment] => -1
        [comment] => 
        [found_posts] => 0
        [max_num_pages] => 0
        [max_num_comment_pages] => 0
        [is_single] => 
        [is_preview] => 
        [is_page] => 
        [is_archive] => 
        [is_date] => 
        [is_year] => 
        [is_month] => 
        [is_day] => 
        [is_time] => 
        [is_author] => 
        [is_category] => 
        [is_tag] => 
        [is_tax] => 
        [is_search] => 
        [is_feed] => 
        [is_comment_feed] => 
        [is_trackback] => 
        [is_home] => 
        [is_privacy_policy] => 
        [is_404] => 
        [is_embed] => 
        [is_paged] => 
        [is_admin] => 
        [is_attachment] => 
        [is_singular] => 
        [is_robots] => 
        [is_favicon] => 
        [is_posts_page] => 
        [is_post_type_archive] => 
        [query_vars_hash:WP_Query:private] => 
        [query_vars_changed:WP_Query:private] => 1
        [thumbnails_cached] => 
        [stopwords:WP_Query:private] => 
        [compat_fields:WP_Query:private] => Array
            (
                [0] => query_vars_hash
                [1] => query_vars_changed
            )
        [compat_methods:WP_Query:private] => Array
            (
                [0] => init_query_flags
                [1] => parse_tax_query
            )
    )

    is possibile retrieve the page from which I open the quickview?
    for example: single product, archive product, home page, etc..

    #23900
    Althemist
    Keymaster

    Hello mediamix,

    I’ll aks our lead developer Alex to step in and help if it’s possible.

    Regards,
    Dimitar

    #23928
    Alex
    Keymaster

    Hello mediamix,

    In the quickview you can access the global $product variable.

    Regards,
    Alex

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register