Kanha Help Me

Remove field from checkout page in woocommerce wordpress

/** Remove all possible fields **/ function wc_remove_checkout_fields( $fields ) { // Billing fields unset( $fields[‘billing’][‘billing_company’] ); unset( $fields[‘billing’][‘billing_email’] ); unset( $fields[‘billing’][‘billing_phone’] ); unset( $fields[‘billing’][‘billing_state’] ); unset( $fields[‘billing’][‘billing_first_name’] ); unset( $fields[‘billing’][‘billing_last_name’] ); unset( $fields[‘billing’][‘billing_address_1’] ); unset( $fields[‘billing’][‘billing_address_2’] ); unset( $fields[‘billing’][‘billing_city’] ); unset( $fields[‘billing’][‘billing_postcode’] ); // Shipping fields unset( $fields[‘shipping’][‘shipping_company’] ); unset( $fields[‘shipping’][‘shipping_phone’] ); unset( $fields[‘shipping’][‘shipping_state’] …

Remove field from checkout page in woocommerce wordpress Read More »

Copy to clipboard in jquery

 function copyToClipboard(elementId) { var copyTextarea = document.getElementById(elementId); console.log(copyTextarea); copyTextarea.select(); document.execCommand(“copy”); jQuery(“.copy”).html(“Copied”); if (jQuery(‘.tcopy’).length) { jQuery(‘#’ + elementId.slice(1)).html(“Copied”); } jQuery(“#liveToast”).toast(“show”); }

get date and time from timestamp in js

  function getDateTime(MatchTimeStamp){     var date = new Date(MatchTimeStamp); var Hours = date.getHours() >12 ? date.getHours()-12 : date.getHours(); var ampm = date.getHours() >= 12 ? ‘pm’ : ‘am’; var fullDate = `${date.getDate()}–${date.getMonth()+1}–${ date.getFullYear()}`; var fullTime = `${Hours}:${date.getMinutes()} ${ampm}`; return {‘date’: fullDate , ‘time’ : fullTime} }

Update particular key and its value in wp_option table in wordpress

//first get all the value by get option   $saved_lisc_data = get_option( ‘lisc_settings’); //then put the update the key and its value $saved_lisc_data[‘lisc_match_status’] = ‘complete’; //then update the option update_option( ‘lisc_settings’ , $saved_lisc_data); //for multiple value update $lisc_updated_data = get_option( ‘lisc_settings’); $lisc_updated_data[‘lisc_enable_status’] = $lisc_enable_status; $lisc_updated_data[‘lisc_api_url’] = $_POST[‘lisc_api_url’]; $lisc_updated_data[‘lisc_interval’] = $_POST[‘lisc_interval’]; $lisc_updated_data[‘lisc_total_timing’] = $_POST[‘lisc_total_timing’]; update_option( ‘lisc_settings’ , …

Update particular key and its value in wp_option table in wordpress Read More »

How to add SSH key to github Account in ubuntu

Step 1 – Generate SSH key first ssh-keygen -t ed25519 -C “[email protected]” Just press enter  again press enter , now your key will generate  Step 2 – Copy the new SSH key   cat /home/kahnucharanswain/.ssh/id_ed25519.pub please use your path eg.  Step 3 – Copy the whole key  Step -4 Open github account -> settings ->SSH and …

How to add SSH key to github Account in ubuntu Read More »