Make required false in woocommerce state field wordpress
add_filter( ‘woocommerce_billing_fields’, ‘wc_cf_filter_state’, 10, 1 ); function wc_cf_filter_state( $fields ) { $fields [‘billing_state’][‘required’] = false; return $fields ; }
add_filter( ‘woocommerce_billing_fields’, ‘wc_cf_filter_state’, 10, 1 ); function wc_cf_filter_state( $fields ) { $fields [‘billing_state’][‘required’] = false; return $fields ; }
/** 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 »
WooCommerce offers settings options, to change some basic look of the email templates, under WooCommerce -> Settings -> Emails-> Email Options. You can change the header image, title text, font color, footer text, etc
sudo chmod -R 777 /var/www/html/wordpress
Go to your php.ini file
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”); }
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} }
//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 »
API response Value reponse is string type to convert into object use json_decode($results)
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 …