Randomize order completed queue for shipbob synchronous flagging fix

// Remove actions we don’t want emails to trigger add_filter( ‘woocommerce_email_actions’, ‘remove_order_completed_email_action’, 99 ); function remove_order_completed_email_action( $actions ) { $actions_to_remove = [ ‘woocommerce_order_status_completed’ ]; return array_diff( $actions, $actions_to_remove ); } // Hook into WooCommerce order status completed for custom action…Continue reading

Remove unnecessary and re-sort tabs

add_filter( ‘woocommerce_product_tabs’, ‘woo_remove_product_tabs’, 98 ); function woo_remove_product_tabs( $tabs ) { unset( $tabs[‘description’] ); // Remove the description tab return $tabs; } add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 ); function woo_reorder_tabs( $tabs ) { $tabs[‘ux_custom_tab’][‘priority’] = 5; $tabs[‘additional_information’][‘priority’] = 45; // Add Info…Continue reading

Hide shipping when free shipping is available

function my_hide_shipping_when_free_is_available( $rates ) { $free = array(); foreach ( $rates as $rate_id => $rate ) { if ( ‘free_shipping’ === $rate->method_id ) { $free[ $rate_id ] = $rate; break; } } return ! empty( $free ) ? $free :…Continue reading

Rewrite Breadcrumb Base

add_filter( ‘woocommerce_breadcrumb_defaults’, ‘jk_change_breadcrumb_home_text’ ); function jk_change_breadcrumb_home_text( $defaults ) { // Change the breadcrumb home text from ‘Home’ to ‘Schrammek’ $defaults[‘home’] = ‘Dr. Schrammek’; return $defaults; }Continue reading

Show local fonts in WP block editor

add_filter( ‘block_editor_settings_all’, function( $editor_settings ) { $css = wp_get_custom_css_post()->post_content; $editor_settings[‘styles’][] = array( ‘css’ => $css ); return $editor_settings; } );Continue reading

User ID in Dashboard

//Adds Custom Column To Users List Table function custom_add_user_id_column($columns) { $columns[‘user_id’] = ‘User ID’; return $columns; } add_filter(‘manage_users_columns’, ‘custom_add_user_id_column’); //Adds Content To The Custom Added Column function custom_show_user_id_column_content($value, $column_name, $user_id) { $user = get_userdata($user_id); if (‘user_id’ == $column_name) { return…Continue reading

Duplicate Page-Post-CPT

/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading

Duplicate Page/Post/CPT

/** * Duplicate WordPress Posts, Pages, and Custom Post Types as Drafts * * This code snippet enables the duplication of WordPress posts, pages, and all registered custom post types (CPTs). * It adds a ‘Duplicate’ link to the row…Continue reading