Use Billing Address in Order Exports
add_filter( ‘wcv_export_orders_use_shipping_address’, ‘wcv_order_export_use_shipping_address’ ); function wcv_order_export_use_shipping_address( ){ return false;Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘wcv_export_orders_use_shipping_address’, ‘wcv_order_export_use_shipping_address’ ); function wcv_order_export_use_shipping_address( ){ return false;Continue reading
add_filter( ‘wcv_dashboard_pages_nav’, ‘change_nav_order’); function change_nav_order( $pages ){ $new_nav_order = array(); $new_nav_order[‘dashboard_home’] = $pages[‘dashboard_home’]; $new_nav_order[‘order’] = $pages[‘order’]; $new_nav_order[‘product’] = $pages[‘product’]; $new_nav_order[‘rating’] = $pages[‘rating’]; $new_nav_order[‘shop_coupon’] = $pages[‘shop_coupon’]; $new_nav_order[‘settings’] = $pages[‘settings’]; $new_nav_order[‘view_store’] = $pages[‘view_store’]; return $new_nav_order;Continue reading
add_filter( ‘generateblocks_query_loop_args’, function( $query_args, $attributes ) { $attributesArray = array_column($attributes[‘htmlAttributes’], ‘value’, ‘attribute’); if (isset($attributesArray[‘data-posts’])) { $posts = explode(‘,’, $attributesArray[‘data-posts’]) ?? []; return array_merge( $query_args, array( ‘post_type’ => $posts, ) ); } return $query_args; }, 10, 2 );Continue reading
add_action( ‘admin_head’, function() { ?>Continue reading
function wws_wwlc_auto_select_role ($user) { //get the selected role $selected_role = get_user_meta($user->ID, ‘wwlc_cf_select_role’, true); // Change to match your custom field. $defaultRole = get_option( ‘wwlc_general_new_lead_role’ ); if ($selected_role) { $user->remove_role( $defaultRole ); $user->add_role( $selected_role ); } } add_action( ‘wwlc_action_after_approve_user’, ‘wws_wwlc_auto_select_role’ );Continue reading
/** * Generate a virtual coupon when order is completed. * * @param int $order_id Order ID. */ function acfwp_create_virtual_coupon( $order_id ) { $order = wc_get_order( $order_id ); $customer_id = $order->get_customer_id(); $create_date = date( ‘Y-m-d H:i:s’, current_time(‘timestamp’)); $expire_date = date(…Continue reading
/*********************************************************************************** * WooCommerce Wholesale Lead Capture Re-send Email Button in User Profile * *********************************************************************************/ function wwlc_add_resend_email_button() { if ( ! is_plugin_active( ‘woocommerce-wholesale-lead-capture/woocommerce-wholesale-lead-capture.bootstrap.php’ ) ) { return; } ?> Re-send wholesale lead email Wholesale application receivedWholesale account approvedWholesale account rejected Send…Continue reading
/** * Insert template at the bottom of the mobile menu. */ add_action( ‘wpex_hook_mobile_menu_bottom’, function() { echo do_shortcode( ‘[wpex_template id=”YOUR_TEMPLATE_ID”]’ ); } );Continue reading