Skip to content

Instantly share code, notes, and snippets.

View lukecav's full-sized avatar
Infinite data generation engine

Luke Cavanagh lukecav

Infinite data generation engine
View GitHub Profile
@lukecav
lukecav / functions.php
Created June 13, 2022 14:42
Remove cached by comment in WP-Optimize plugin
add_filter('wpo_cache_show_cached_by_comment', '__return_false');
@lukecav
lukecav / functions.php
Last active June 10, 2022 21:01
Remove UpdraftPlus plugin from the admin bar
function updraftplus_remove_toolbar_menu() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('updraft_admin_node');
}
add_action('wp_before_admin_bar_render', 'updraftplus_remove_toolbar_menu', 999);
@lukecav
lukecav / wp-config.php
Created June 10, 2022 20:26
Disable the admin bar from UpdraftPlus plugin
define('UPDRAFTPLUS_ADMINBAR_DISABLE', true);
@lukecav
lukecav / Query
Created June 10, 2022 20:00
WooCommerce Stripe database cleanup
DELETE FROM `wp_usermeta`
WHERE meta_key IN ( '_stripe_customer_id', '_stripe_source_id', '_stripe_card_id' );
DELETE tokenmeta FROM `wp_woocommerce_payment_tokenmeta` tokenmeta
INNER JOIN `wp_woocommerce_payment_tokens` ON `wp_woocommerce_payment_tokens`.`token_id` = tokenmeta.`payment_token_id`
WHERE `wp_woocommerce_payment_tokens`.`gateway_id` = 'stripe';
DELETE FROM `wp_woocommerce_payment_tokens` WHERE gateway_id='stripe';
@lukecav
lukecav / Links
Created June 10, 2022 18:54
Index Management in Magento 2.4.x
@lukecav
lukecav / Links
Created June 10, 2022 15:25
Migration for a Magento 1 store to Magento 2.4.x
@lukecav
lukecav / Option names
Created June 7, 2022 14:13
Disable Bloat for WordPress & WooCommerce plugin created options
wcbloat_admin_disable
wcbloat_marketing_disable
wcbloat_wc_helper_disable
wcbloat_wc_status_meta_box_disable
wcbloat_wc_marketplace
wcbloat_password_meter_disable
wcbloat_wc_scripts_disable
wcbloat_wc_fragmentation_disable
wcbloat_wc_widgets_disable
wcbloat_wc_skyverge_disable
@lukecav
lukecav / wp-config.php
Created June 6, 2022 16:40
Define EWWW Image Optimizer plugin JPG image quality
define( ‘EWWW_IMAGE_OPTIMIZER_JPG_QUALITY’, 90 );
@lukecav
lukecav / wp-config.php
Created June 3, 2022 20:43
ShortPixel Image Optimizer plugin disable flock
define("SHORTPIXEL_NOFLOCK", true);
@lukecav
lukecav / Commands
Created June 3, 2022 17:50
Find and delete all WebP images in the uploads folder of WordPress
cd public_html
cd wp-content/uploads
find . -name "*.webp" -type f
find . -name "*.webp" -type f -delete