Skip to content

Instantly share code, notes, and snippets.

@andrebian
Last active December 21, 2015 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrebian/6282990 to your computer and use it in GitHub Desktop.
Save andrebian/6282990 to your computer and use it in GitHub Desktop.
<?php
// $q variable
WP_Query Object
(
[query] => Array
(
[post_type] => product
)
[query_vars] => Array
(
[post_type] => product
[error] =>
[m] => 0
[p] => 0
[post_parent] =>
[subpost] =>
[subpost_id] =>
[attachment] =>
[attachment_id] => 0
[name] =>
[static] =>
[pagename] =>
[page_id] => 0
[second] =>
[minute] =>
[hour] =>
[day] => 0
[monthnum] => 0
[year] => 0
[w] => 0
[category_name] =>
[tag] =>
[cat] =>
[tag_id] =>
[author_name] =>
[feed] =>
[tb] =>
[paged] => 0
[comments_popup] =>
[meta_key] =>
[meta_value] =>
[preview] =>
[s] =>
[sentence] =>
[fields] =>
[menu_order] =>
[category__in] => Array
(
)
[category__not_in] => Array
(
)
[category__and] => Array
(
)
[post__in] => Array
(
)
[post__not_in] => Array
(
)
[tag__in] => Array
(
)
[tag__not_in] => Array
(
)
[tag__and] => Array
(
)
[tag_slug__in] => Array
(
)
[tag_slug__and] => Array
(
)
[orderby] => menu_order title
[order] => ASC
[meta_query] => Array
(
[0] =>
[1] => Array
(
[key] => _visibility
[value] => Array
(
[0] => visible
[1] => catalog
)
[compare] => IN
)
[2] => Array
(
[key] => _stock_status
[value] => instock
[compare] => =
)
)
[posts_per_page] => 10
[wc_query] => 1
)
[tax_query] => WP_Tax_Query Object
(
[queries] => Array
(
)
[relation] => AND
)
[meta_query] =>
[queried_object] => stdClass Object
(
[labels] => stdClass Object
(
[name] => Produtos
[singular_name] => Produto
[add_new] => Novo produto
[add_new_item] => Novo produto
[edit_item] => Editar produto
[new_item] => Novo produto
[view_item] => Detalhes do produto
[search_items] => Procurar produtos
[not_found] => Nenhum produto encontrado
[not_found_in_trash] => Nenhum produto encontrado na lixeira
[parent_item_colon] =>
[all_items] => Produtos
[menu_name] => Produtos
[edit] => Editar
[view] => Detalhes do produto
[parent] => Produto principal
[name_admin_bar] => Produto
)
[description] => Aqui você pode adicionar novos produtos para sua loja.
[publicly_queryable] => 1
[exclude_from_search] =>
[capability_type] => product
[map_meta_cap] => 1
[_builtin] =>
[_edit_link] => post.php?post=%d
[hierarchical] =>
[public] => 1
[rewrite] => Array
(
[slug] => produto
[with_front] =>
[feeds] => 1
[pages] => 1
[ep_mask] => 1
)
[has_archive] => loja
[query_var] => product
[register_meta_box_cb] =>
[taxonomies] => Array
(
)
[show_ui] => 1
[menu_position] =>
[menu_icon] =>
[can_export] => 1
[show_in_nav_menus] => 1
[show_in_menu] => 1
[show_in_admin_bar] => 1
[delete_with_user] =>
[name] => product
[cap] => stdClass Object
(
[edit_post] => edit_product
[read_post] => read_product
[delete_post] => delete_product
[edit_posts] => edit_products
[edit_others_posts] => edit_others_products
[publish_posts] => publish_products
[read_private_posts] => read_private_products
[read] => read
[delete_posts] => delete_products
[delete_private_posts] => delete_private_products
[delete_published_posts] => delete_published_products
[delete_others_posts] => delete_others_products
[edit_private_posts] => edit_private_products
[edit_published_posts] => edit_published_products
[create_posts] => edit_products
)
[label] => Produtos
)
[queried_object_id] => 0
[post_count] => 0
[current_post] => -1
[in_the_loop] =>
[comment_count] => 0
[current_comment] => -1
[found_posts] => 0
[max_num_pages] => 0
[max_num_comment_pages] => 0
[is_single] =>
[is_preview] =>
[is_page] =>
[is_archive] => 1
[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_404] =>
[is_comments_popup] =>
[is_paged] =>
[is_admin] =>
[is_attachment] =>
[is_singular] =>
[is_robots] =>
[is_posts_page] =>
[is_post_type_archive] => 1
[query_vars_hash] => 5ad8055a3d8ffd7b474b37d85307d3f4
[query_vars_changed] =>
[thumbnails_cached] =>
)
// end o $q variable
// $this
WC_Query Object
(
[unfiltered_product_ids] => Array
(
)
[filtered_product_ids] => Array
(
)
[post__in] => Array
(
)
[meta_query] => Array
(
[0] =>
[1] => Array
(
[key] => _visibility
[value] => Array
(
[0] => visible
[1] => catalog
)
[compare] => IN
)
[2] => Array
(
[key] => _stock_status
[value] => instock
[compare] => =
)
)
[layered_nav_post__in] => Array
(
)
[layered_nav_product_ids] => Array
(
)
)
// end of $this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment