I want show only data for today

Well dear thanks for your effort.I solved this .here is answer. $user1 = $wpdb->get_results(“select product,checked_by,submit_date,unit_data,temperature_in,temperature_out,time_in,category from diary_user_form_storage where category_name=”opening” and DATE(`submit_date`) = CURDATE()”);

PHP – Woocommerce 3.2 Add variable shipping insurance with multiple “else if ” conditions

Solved! I had the statements in the wrong order, the first if statement was satisfied so none of the others were checked. Reversed them and voila! I also could have added a <= to each statement //General Fall back for shipping and cart totals <= 50 $insurance_fee = 0; $chosen_methods = WC()->session->get( ‘USPS_Simple’ ); $chosen_shipping … Read more

PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "

To change choices depending on what an user selected in another input/select, you need to use the WP AJAX API. In your functions.php, use wp_localize_script() to get AJAX url available on front-end and define an AJAX action callback function mytheme_custom_scripts() { if ( is_page(‘Support’) ) { $scriptSrc = get_stylesheet_directory_uri() . ‘/js/freshdeskdata.js’; wp_enqueue_script( ‘myhandle’, $scriptSrc , … Read more

wp_send_json erase last value

You don’t need to specify datatype in your AJAX call. Also, WP handles AJAX a bit differently, primarily: $(‘#filter_evenement’).submit(function(){ jQuery.ajax({ url:ajaxurl, type:”POST”, data : {action: “evenements_filter_function”, val1: “value1”, val2: “values2”}, success:function(data){console.log(data); var dataArray = jQuery.parseJSON(data);//parse JSON }, fail: function( jqXHR, textStatus, errorThrown ) { } }); }); data has to contain action which specifies the … Read more

Update all posts in custom post types with wp_cron()?

Yeah, you can schedule a WP cron job to loop through all posts of a post type and perform the check / add the term. Wouldn’t recommend that for a very big page with thousands of posts though. In example below the scheduled job would run approximately once a day – remember that wp cron … Read more