Archives: Tutorial

Laravel: .htaccess redirect from root to /public

Please the code below in your .htaccess file at the root of your laravel installation. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule>   If this doesn’t work for you, please make sure you have ran “compose install” downloading laravel OR your server has rewrite module enable.

Require WooCommerce registration username to be email

Add the following lines of code to your functions.php file and you should be set. add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ ); function custom_override_checkout_fields( $fields ) { $fields[‘account’][‘account_username’][‘type’] = ’email’; $fields[‘account’][‘account_username’][‘label’] = ‘Account username (email)’; return $fields; } What this code does is changes the type of the username field into email which by default, modern browsers … Continued

Changing “Choose an option” in Woocommerce!

function get_text_for_select_based_on_attribute($attribute) { $attribute_name = wc_attribute_label($attribute); $select_text = ‘Select a ‘ . $attribute_name; return $select_text; } function wc_dropdown_variation_attribute_options( $args = array() ) { $select_text = get_text_for_select_based_on_attribute($args[‘attribute’]); $args = wp_parse_args( $args, array( ‘options’ => false, ‘attribute’ => false, ‘product’ => false, ‘selected’ => false, ‘name’ => ”, ‘id’ => ”, ‘class’ => ”, ‘show_option_none’ => __( … Continued