I need to remove something from the product page if this product haven’t a description This my code but i didn’t know how to check if product description empty or no add_action(‘wp_enqueue_scripts’, ‘remove_included_tab_if_description_empty’); function remove_included_tab_if_description_empty() { echo ‘<style type="text/css"> .woocommerce-tabs ul.tabs li { display: none; } </style>’; } Sourc..

Read more

I am creating the fetch query from the database with date wise but it not working.. My SQL is – $date = "2020-09-20"; $stmt = $con->prepare("SELECT * FROM `table` WHERE `inv_date` = :date AND `name` = :channel"); $stmt->execute(array(‘:date’ => $date, ‘:channel’ => "FLIPKART")); if ($stmt->rowCount() > 0) { //do something } else { echo "not ..

Read more

Table (Setting) runningnumber(AI) food_sku food_id current_running_number 1 A100 130 A100-00300 Table (inventory) inventory_id food_id running_number stocks 1 130 A100-00300 0 2 130 A100-00301 1 3 130 A100-00302 1 4 130 A100-00303 0 5 130 A100-00304 1 6 130 A100-00305 1 for ($x = 1; $x <= $cart_item_total; $x++) { $get_food_running_number= "SELECT * FROM setting WHERE ..

Read more

I’m trying to create a prepared statement that have many condition this is my original query $sql ="SELECT name, tran, no FROM abcd WHERE type = ‘P’ AND Status = ‘0’ AND id IN(‘acv12’, ‘qty1’, ‘obm2’) AND date(date) >= ‘2019-12-18’"; this is what i have tried $param_type = ‘P’; $param_Status =’0′; $param_date = ‘2019-12-18’; $ids ..

Read more

I’m modifying an open source source script to show genealogy via organization chart style. having users table with id and parentid field. when I open /viewOrgChart?user_id=1 or numbers not in 2 3 4 5, it works well! BUT when I open with user_id 2 3 4 5, it throw ERROR: Trying to get property ‘parentid’ ..

Read more

I am getting a "Trying to get property of non-object" error when using the following code to get the next div id sibling (the div id sibling after ‘div id = "XXX"’. Could someone please tell me how to correct it? Thanks $Html ='<div id="currency"> <a href="http://www.link.com/313"> <div class="sub_item"> <h3>Sub Categ A</h3> </div> </a> </div> ..

Read more