Skip to content
Advertisement

Tag: woocommerce

Force WooCommerce to update fragment

I created plugin which uses WooCommerce fragments for showing to user how many points they have. When user uses some of the points (by adding product into cart) everything works ok. But when admin adds points to user by admin-interface, the fragment is not updated until user adds a new product into cart. Here is code sample: Is there any

Can not get the product details from order_id on the new order hook function

With WooCommerce, I have the following hook in my function.php after the new order is submitted: The above code is not giving me any output i’e it is not entering inside the foreach loop that’s why var_dump() not giving me any output, but if I mention the order_id specifically like create_job_openings($order_id=517) it works, even I tried echo $order_id before foreach

Advertisement