multisite
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [Mercado Pago payments for WooCommerce] Pix e cartão, não funcionam maispara pagamento com carão de crédito, mesmo erro:
Failed to connect to api.mercadopago.com port 443: Connection refused
ou seja, o plugin não funciona mais.Forum: Plugins
In reply to: [Contextual Related Posts] show products in stock onlyyes, done 😉
Forum: Plugins
In reply to: [Contextual Related Posts] show products in stock onlyhello, yes, it totally worked, I just had to add a “)” in the second line of code, it was like this:
function crp_custom_wp_query($query) { if(is_singular('product') && $query->get( 'crp_query')){ $query->set('post_type', 'product'); $meta_query = [ 'relation' => 'AND', [ 'key' => '_stock_status', 'value' => ['instock','onbackorder'], 'compare' => 'IN', ] ]; $query->set('meta_query', $meta_query); } return $query; } add_filter('pre_get_posts', 'crp_custom_wp_query', 100);Thank you very much 😀
Forum: Plugins
In reply to: [Contextual Related Posts] show products in stock onlyI determine if it’s in stock or not when I create or edit a product, it’s the same as a post but it’s a woocommerce product.
maybe this code above, from another related plugin can help
Forum: Plugins
In reply to: [Contextual Related Posts] show products in stock onlyfunction yarpp_custom_wp_query($query) { if(isset($query->yarpp_cache_type)){ $query->set('post_type', 'product'); $meta_query = [ 'relation' => 'AND', [ 'key' => '_stock_status', 'value' => ['instock','onbackorder'], 'compare' => 'IN', ] ]; $query->set('meta_query', $meta_query); } return $query; } add_filter('pre_get_posts', 'yarpp_custom_wp_query', 100);
Viewing 5 replies - 1 through 5 (of 5 total)