Skip to content

Instantly share code, notes, and snippets.

View humayunahmed8's full-sized avatar
🤡
code fool

Humayun Ahmed humayunahmed8

🤡
code fool
View GitHub Profile
@humayunahmed8
humayunahmed8 / remove_checkout_fields.php
Created October 27, 2020 11:14 — forked from cryptexvinci/remove_checkout_fields.php
Remove fields from WooCommerce checkout page.
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' );
function custom_remove_woo_checkout_fields( $fields ) {
// remove billing fields
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
@humayunahmed8
humayunahmed8 / wc-display-my-account-template.php
Created April 11, 2021 08:22 — forked from woogists/wc-display-my-account-template.php
[Theming Snippets] Display my-account link in a template file
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
<?php }
else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>"><?php _e('Login / Register','woothemes'); ?></a>
<?php } ?>
<?php
function stock_styled_map_shortcode($atts, $content = null) {
extract( shortcode_atts( array(
'lat' => '40.7433379',
'lng' => '-74.0103219',
'title' => 'Head Office',
'desc' => 'House 21, Grand St.<br/> New York, USA',
if ( ! function_exists( 'prefix_fonts_url' ) ) :
/**
* Register Google fonts.
*
* @return string Google fonts URL for the theme.
*/
function prefix_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = '';