Skip to content

Instantly share code, notes, and snippets.

Proposed changes

When the Bluehost plugin is active, third-party WooCommerce payment gateways (Stripe, Braintree, etc.) disappear from the checkout page. Customers see no payment options and can't complete purchases. Deactivating the Bluehost plugin immediately restores them.

Fixes #324 | PRESS0-4235

Root cause

TaskCompletionTriggers::register_payment_hooks_and_validators() calls \WC_Payment_Gateways::instance()->get_payment_gateway_ids() synchronously from its constructor. The Newfold module loader fires module callbacks on after_setup_theme priority 100, which is before woocommerce_init (fired at init priority 0). That first call to WC_Payment_Gateways::instance() triggers WC_Payment_Gateways::init(), which applies the woocommerce_payment_gateways filter and caches the result. Any gateway plugin that registers via that filter on woocommerce_init or later — a standard, common pattern — gets permanently excluded because the cac

Summarize the issue (briefly)

When the Bluehost plugin is active, customers using third-party WooCommerce payment gateways (e.g. Stripe, Braintree) see no payment options on the checkout page. Deactivating the Bluehost plugin immediately restores the missing gateways. The root cause is in wp-module-next-steps.

Steps to reproduce

  1. Install WooCommerce and a third-party payment gateway plugin (e.g. WooCommerce Stripe Gateway)
  2. Configure and enable the payment gateway
  3. Activate the Bluehost plugin
  4. Add a product to cart and go to the checkout page
  5. Observe that the configured payment gateway is missing from the payment options
@chrisdavidmiles
chrisdavidmiles / plugin-update-notifications.php
Created June 13, 2025 00:21
WordPress Plugin: Plugin Update Notifications
<?php
/**
* Plugin Name: Plugin Update Notifications
* Description: Sends notifications when plugin updates are available via Email, Discord webhook, or ntfy.sh webhook.
* Version: 1.0
* Update URI: false
*/
defined('ABSPATH') || exit; // Exit if accessed directly
@chrisdavidmiles
chrisdavidmiles / disallow-file-edit.php
Created June 13, 2025 00:02
WordPress Plugin: Disallow File Edit
<?php
/*
Plugin Name: Disallow File Edit
Description: Disallows file editing from the WordPress admin panel.
Version: 1.0
Update URI: false
*/
defined('DISALLOW_FILE_EDIT') || define('DISALLOW_FILE_EDIT', true);
@chrisdavidmiles
chrisdavidmiles / password-policy-enforcement.php
Created June 12, 2025 23:58
WordPress Plugin: Password Policy Enforcement
<?php
/**
* Plugin Name: Password Policy Enforcement
* Description: Enforces strong passwords, provides detailed error messages, and checks passwords against HaveIBeenPwned on creation and reset.
* Version: 1.0
* Update URI: false
*/
defined('ABSPATH') || exit; // Exit if accessed directly
@chrisdavidmiles
chrisdavidmiles / security-headers.php
Created June 12, 2025 23:57
WordPress Plugin: Security Headers
<?php
/*
Plugin Name: Security Headers
Description: Adds security-related HTTP headers to your WordPress site.
Version: 1.0
Update URI: false
*/
defined('ABSPATH') || exit; // Exit if accessed directly
@chrisdavidmiles
chrisdavidmiles / disable-xmlrpc.php
Created June 12, 2025 23:51
WordPress Plugin: Disable XML-RPC
<?php
/*
Plugin Name: Disable XML-RPC
Description: Completely disables XML-RPC functionality in WordPress.
Version: 1.0
Update URI: false
*/
add_filter('xmlrpc_enabled', '__return_false');
@chrisdavidmiles
chrisdavidmiles / enforce-auto-update.php
Created June 12, 2025 23:48
WordPress Plugin: Enforce Auto Update
<?php
/**
* Plugin Name: Enforce Auto Update
* Description: Enables automatic updates for WordPress core (minor and major stable releases), plugins, and themes.
* Version: 1.0
* Update URI: false
*/
// Enable automatic updates for WordPress core (minor and major stable releases, excluding development releases)
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
@chrisdavidmiles
chrisdavidmiles / wp-login.php.html
Created May 14, 2023 01:55
Rick roll wp-login.php page
<!--------------------------------------------------------+
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣶⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⠿⠟⠛⠻⣿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣆⣀⣀⠀⣿⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠻⣿⣿⣿⠅⠛⠋⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢼⣿⣿⣿⣃⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣟⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣛⣛⣫⡄⠀⢸⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
|⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⡆⠸⣿⣿⣿⡷⠂⠨⣿⣿⣿⣿⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
@chrisdavidmiles
chrisdavidmiles / audiobook-commands.md
Last active December 25, 2022 23:38
Common Audiobook Plex Prep

Combine lots of mp3s into one file. They will be combined in alphabetical order so prepare the filenames ahead of time with leading zeros if needed (e.g. whatever-01.mp3 whatever-02.mp3 ... etc)

mp3wrap combined.mp3 origs/*


Strip out all the media track id3 tags from a file (useful after combining with mp3wrap)

id3convert -s file.mp3