Rename WooCommerce “Coupon” terminology to “Discount”

if ( class_exists( ‘WooCommerce’ ) ) { add_filter( ‘gettext’, ‘rd_wc_generic_coupon_replacement’, 20, 3 ); add_filter( ‘ngettext’, ‘rd_wc_generic_coupon_replacement_plural’, 20, 5 ); // Also replace wording directly in notices (covers cases where text bypasses gettext later) add_filter( ‘woocommerce_add_notice’, ‘rd_wc_generic_coupon_replacement_in_notice’, 20, 1 ); add_filter(…Continue reading

Create ‘Clear Cart’ URL Parameter

if ( class_exists( ‘WooCommerce’ ) ) { add_action( ‘template_redirect’, function() { if ( ! WC()->cart ) { return; } if ( isset( $_GET[‘clear-cart’] ) && $_GET[‘clear-cart’] === ‘true’ ) { WC()->cart->empty_cart(); wp_safe_redirect( remove_query_arg( ‘clear-cart’ ) ); exit; } if (…Continue reading

Add Shipping Phone Field to Shipping Address section

if ( ! class_exists( ‘WooCommerce’ ) ) { return; } add_filter( ‘woocommerce_shipping_fields’, ‘rd_add_shipping_phone_field’ ); function rd_add_shipping_phone_field( $fields ) { $fields[‘shipping_phone’] = array( ‘label’ => __( ‘Phone (For Delivery Tracking SMS)’, ‘woocommerce’ ), ‘required’ => false, // Change to ‘true’ if…Continue reading

Full Speaker Meta with profile keys

/** * Initialize custom meta fields for Audio > Speakers products. * * Applies to product_cat slugs: * – speakers * – full-range * – subwoofers * – monitors * – line-array * * Change the slugs in $speaker_category_slugs if…Continue reading

Hard-Disable TEC Zoom/Webex (DB Password Check Fix)

add_action( ‘init’, function () { // Only run if TEC/tribe() container exists. if ( ! function_exists( ‘tribe’ ) ) { return; } /* Disable Zoom provider actions */ $zoom_provider = tribe( \Tribe\Events\Virtual\Meetings\Zoom_Provider::class ); if ( $zoom_provider instanceof \Tribe\Events\Virtual\Meetings\Zoom_Provider ) {…Continue reading

Change Name Order in Marketking Dashboard

/** * Plugin Name: MarketKing Vendor Dashboard Name Order Snippet * Description: Changes name display order in MarketKing vendor dashboard from “firstname lastname” to “lastname firstname” in all areas * Version: 1.0.0 * Author: Custom Snippet * * Instructions: *…Continue reading