WP_Query->get_posts() take too long time to load data maybe 33 sec
WP_Query->get_posts() take too long time to load data maybe 33 sec
WP_Query->get_posts() take too long time to load data maybe 33 sec
remove Woocommerce “add to cart” to be “Download” button [closed]
First, you need to ensure that your count($args[‘options’] is actually 1. Check the following example: You can see that when I print_r($args[‘options’]), I got 4 elements, so count($args[‘options’] here is 4. But if you look at the dropdown beneath it, you see that it only has 1 option. Why? Because variations (and their attributes) that … Read more
I can’t say it looks particularly blurry to me, but you are enlarging it in your CSS. It looks like the image is 500 by 781 pixels, whereas your CSS is pushing it to 600 by 937. Browsers do not do a great job of enlarging images. Start with a bigger image.
There’s no need to add another class. The code you’re using already creates separate classes and ID. You could do this with just css: Inspect your site with console, but your div label should be technical_documents so your code would be: #tab-title-technical_documents a::before { content: “\f02d”; font-family: ‘Font Awesome 6′; font-weight: 900; } You didn’t … Read more
Something like this should work: const {select, subscribe} = window.wp.data; const cartStoreKey = window.wc.wcBlocksData.CART_STORE_KEY; const unsub = subscribe( onCartChange, cartStoreKey ); function onCartChange() { const cart = select( cartStoreKey ).getCartData(); console.log( ‘¡ cart change !’, cart ); } The block’s frontend script should have the woocommerce script’s handle as a dependency so the window.wc.wcBlocksData will … Read more
To show the users nickname in WooCommerce order emails instead of the user login, you need to retrieve the users display name from their user data. add_filter( ‘woocommerce_email_customer_details_fields’, ‘add_user_nickname_to_woocommerce_emails’, 10, 3 ); function add_user_nickname_to_woocommerce_emails( $fields, $sent_to_admin, $order ) { $user_id = $order->get_customer_id(); $user_info = get_userdata( $user_id ); // Retrieve the users nickname (display name) $user_nickname … Read more
I think the condition here has_term($term_slug, $taxonomy, $variation->get_id()) won’t work for variation. If you want to check term, we need to check with parent variable product instead of checking variation because Woocommerce doesn’t store any taxonomy/term attribute to variation. Instead of using has_term, we can use your existing attributes in get_variation_attributes to get and check … Read more
Here’s the right code I made a mistake with s param function custom_search_query($query) { if (!is_admin() && $query->is_main_query() && $query->is_search()) { $search_query = get_search_query(); // Retrieve the search query $api_url=”https://api.adenwalla.in/api/search/data”; $args = array( ‘body’ => json_encode(array(‘query’ => $search_query)), ‘headers’ => array(‘Content-Type’ => ‘application/json’), ‘timeout’ => 60 ); $response = wp_remote_post($api_url, $args); $body = wp_remote_retrieve_body($response); $results … Read more
As we know WooCommerce product reviews are essentially WordPress comments with a specific comment_type. Firstly we hook into the Comment Submission and then we will check If the Comment is a WooCommerce Product Review and then we trigger our Custom Action. Could you please try to add this to your theme’s functions.php or in your … Read more