July 16, 2019

WC Order Split

WC Order Split

June 8, 2019

When WooCommerce was founded?

WooCommerce was first developed by WordPress theme developer WooThemes, who hired Mike Jolley and James Koster, developers at Jigowatt, to work on a fork of Jigoshop that became WooCommerce. Read more, why woocommerce is better?

January 11, 2019

WordPress Plugin – Export Customers Data

Export Customers Data

January 10, 2018

Replace your WordPress Avatar URL with ACF image field

Replace your WordPress Avatar URL with ACF image field add_filter(‘get_avatar_url’, ‘lb_acf_profile_avatar_url’, 10, 2); function lb_acf_profile_avatar_url($avatar, $id){ $image_id = get_user_meta($id, ‘lb_local_avatar’, true); if ( ! $image_id ) { return $avatar; } $image_url = wp_get_attachment_image_src( $image_id, ‘thumbnail’ ); $avatar = $image_url[0]; return $avatar; }

January 9, 2018

How to allow WooCommerce customers to add capability of image uploading to library?

How to allow WooCommerce customers to add capability of image uploading to library? add_action(‘admin_init’, ‘allow_customer_uploads’); function allow_customer_uploads(){ $customer = get_role(‘customer’); $customer->add_cap(‘upload_files’); }

How to use ACF Image field as WordPress user profile avatar?

How to use ACF Image field as WordPress user profile avatar? add_filter(‘get_avatar’, ‘lb_acf_profile_avatar’, 10, 5); function lb_acf_profile_avatar( $avatar, $id_or_email, $size, $default, $alt ) { $field_name = ‘lb_local_avatar’; $user = ”; // Get user by id or email if ( is_numeric( $id_or_email ) ) { $id = (int) $id_or_email; $user = get_user_by( ‘id’ , $id ); […]

Restrict users to view only their uploads while using ACF

Restrict users to view only their uploads while using ACF add_filter( ‘ajax_query_attachments_args’, ‘lb_show_current_user_attachments’ ); function lb_show_current_user_attachments( $query ) { $user_id = get_current_user_id(); if ( $user_id && !current_user_can(‘activate_plugins’) && !current_user_can(‘edit_others_posts ‘) ) { $query[‘author’] = $user_id; } return $query; }

October 29, 2017

WooCommerce – Please choose product options…

WooCommerce – Variable Product – Please choose product options… Situation: When you are using some custom template for single product (WooCommerce) and variation selection isn’t taking effect on click because your are using “do_action” with “woocommerce_before_add_to_cart_form” and “woocommerce_after_variations_form” maybe inside a shortcode? If yes, then WooCommerce is leaving your form as orphan and will not […]