hello I want to show related products based on my custom query but I just want to show ‘in_stocks’ products and meta_query not working with tax_query. anyone can help me? $query_args = array( ‘…
WordPress Plugin JS remove version
Hello I want to include my js file without adding ?ver=x.x.x to it I tried all the solutions but nothing help me to get the success Here is my Code I am trying to add add_action( ‘wp_enqueue_scripts’, …
“start_batch was called incorrectly” on gRPC unary call
I make an unary call from PHP code like that: Sometimes I get the LogicException with message “start_batch was called incorrectly”. Any thoughts how to deal with that exception and what is the root cause? Answer After some investigation I found out that the problem occurs because of reusing the instance of GrpcUnaryCall in retries. You must not do that
Telegram bot – sendMessage text
I have 2 problems with programming telegram bot by PHP. problem: please, When I try send text with more lines by using API of telegram. By this code: <?php $update = file_get_contents('php://…
Is there a possibility to store device unique ‘identifier’ in my database? (PHP)
I am doing a poll voting system and I want each device to have only one chance to vote. How can I do that using PHP? Answer this will get value from the environment variable use of cookies //if user vote first time and successfully then set $vote = “success” then set cookie variable for that device for example //
WooCommerce Price Filter – trigger on change instead of submit
Does anyone know how I can customize the WooCommerce price filter widget to filter on a ‘change’ trigger instead of having the submit button? It is located in templates/content-widget-price-filter.php – but since it is made as a form, does that mean I HAVE to use a submit button to trigger the event? Answer In your child theme, you could create
Add an email attachment to WooCommerce notifications based on product category
For some of my product I need to send an additional pdf (not an invoice) to my customers. With the help of this post: https://wordpress.org/support/topic/attach-pdf-to-confirmation-email-for-specific-product/ I was able to attach an attachment to every order confirmation email. Then I tried to change the code to filter by product sku. In this post I found some infos about the variables that
How to Setup and use FirePHP with FireFox Developer
I am an old school programmer so I am having issues trying to install and use some of the newer programming tools. I am building a website using php but need some suggestions on the best debugging …
Automatically generate username based on user ID in WooCommerce
I’m working on a WooCommerce project where each user have an ID number. I would like to use the default WooCommerce username field for this user ID. When creating an account, can I automatically generate an account username for the customer based on their user ID? Example: User ID = 101, Auto generated Username = 101 Is it possible? Any
check through second column by first column id
I have 2 columns under sales table in SQL as below id itemid 1 31 1 32 1 33 1 34 I need through the PHP to check by the id, if the $_SESSION[‘id’] has any item number in the second column then …