All muhaza's note in developing website. Front-end & uiux method. Real life implementation for webdesigner.
Friday, 8 April 2022
WOOCOMMERCE FLYCART
Sunday, 14 November 2021
PHONE NUMBER OR EMAIL NOT REQUIRED
// For billing email and phone - Make them not required
add_filter( 'woocommerce_billing_fields', 'filter_billing_fields', 20, 1 );
function filter_billing_fields( $billing_fields ) {
// Only on checkout page
if( ! is_checkout() ) return $billing_fields;
$billing_fields['billing_phone']['required'] = false;
$billing_fields['billing_email']['required'] = false;
return $billing_fields;
}
Wednesday, 19 August 2020
Add Custom Woo Commerce My-Account Tab Page
// ------------------
// 1. Register new endpoint to use for My Account page
// Note: Resave Permalinks or it will give 404 error
function muhaza_add_extra_tab_endpoint() {
add_rewrite_endpoint( 'extra-tab', EP_ROOT | EP_PAGES );
}
add_action( 'init', 'muhaza_add_extra_tab_endpoint' );
// ------------------
// 2. Add new query var
function muhaza_extra_tab_query_vars( $vars ) {
$vars[] = 'extra-tab';
return $vars;
}
add_filter( 'query_vars', 'muhaza_extra_tab_query_vars', 0 );
// ------------------
// 3. Insert the new endpoint into the My Account menu
function muhaza_add_extra_tab_link_my_account( $items ) {
$items['extra-tab'] = 'Extra Tab';
return $items;
}
add_filter( 'woocommerce_account_menu_items', 'muhaza_add_extra_tab_link_my_account' );
// ------------------
// 4. Add content to the new endpoint
function muhaza_extra_tab_content() {
echo '<h3>Premium WooCommerce Support</h3><p>Welcome to the WooCommerce support area. As a premium customer, you can submit a ticket should you have any WooCommerce issues with your website, snippets or customization. <i>Please contact your theme/plugin developer for theme/plugin-related support.</i></p>';
echo do_shortcode( ' /* your shortcode here */ ' );
}
add_action( 'woocommerce_account_extra-tab_endpoint', 'muhaza_extra_tab_content' );
// Note: add_action must follow 'woocommerce_account_{your-endpoint-slug}_endpoint' format
Friday, 14 August 2020
Lets Print Anything From Wp_User
Do like this bro!
<?php
global
$current_user
;
get_currentuserinfo();
echo
'Username: '
.
$current_user
->user_login .
"\n"
;
echo
'User email: '
.
$current_user
->user_email .
"\n"
;
echo
'User first name: '
.
$current_user
->user_firstname .
"\n"
;
echo
'User last name: '
.
$current_user
->user_lastname .
"\n"
;
echo
'User display name: '
.
$current_user
->display_name .
"\n"
;
echo
'User ID: '
.
$current_user
->ID .
"\n"
;
Submit RSSa
rssing.com
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 < div style = "background-color:#D94A38;width:170px;height:80px;ma...
-
//editable cookies enable $( function (){ var liveEdit = document .getElementById( 'live-edit' ); $(liveEdit).blur( f...