add_action( ‘admin_init’, ‘media_sync_library’ ); function media_sync_library() { // Folder inside uploads to scan $scan_folder = ‘/2026/02’; $upload_dir = wp_upload_dir(); $base_dir = $upload_dir[‘basedir’]; $base_url = $upload_dir[‘baseurl’]; $target_dir = $base_dir . $scan_folder; // Stop if folder doesn’t exist if( ! is_dir( $target_dir…Continue reading
/** * Force “Become a Vendor” to always go to * /my-account/become-a-vendor/ * * Applies to BOTH Free and Pro versions. * Only affects users who are NOT vendor or pending-vendor. */ function custom_become_vendor_url_override( $url, $endpoint, $value, $permalink ) {…Continue reading
if ( ! defined( ‘ABSPATH’ ) ) exit; if ( ! function_exists( ‘WC’ ) ) return; class RD_WOE_Job_Usage_Logger { private static $armed = false; private static $t0 = 0.0; private static $start_bytes = 0; private static $mem_limit = ”; private…Continue reading
if ( ! function_exists( ‘rw_geo_search_after_header_1280’ ) ) { add_action( ‘kadence_after_header’, ‘rw_geo_search_after_header_1280’ ); function rw_geo_search_after_header_1280() { if ( is_admin() ) { return; } echo ‘ ‘; echo ‘ ‘; echo do_shortcode( ‘[geo_search]’ ); echo ‘ ‘; echo ‘ ‘; } }Continue reading
/** * Plugin Name: RewardsWP — My Account Rewards Tab * Description: Adds a “My Rewards” tab to WooCommerce My Account that opens the rewards widget. * Version: 1.0.0 * Author: AffiliateWP */ if ( ! defined( ‘ABSPATH’ ) )…Continue reading
/** * NIRMAKO Dynamic Event Schema (JSON-LD) – FULL * Covers: startDate, endDate, location, image, description, * organizer(+url), performer, eventStatus, offers(url/validFrom/price) */ function nirmako_next_monday_datetime($hour = 10, $minute = 0, $tz = ‘Asia/Jerusalem’) { $dt = new DateTime(‘now’, new DateTimeZone($tz)); $dt->setTime($hour,…Continue reading
add_action( ‘woocommerce_email_before_order_table’, ‘conditionally_remove_coupon_section_from_email’, 5, 4 ); function conditionally_remove_coupon_section_from_email( $order, $sent_to_admin, $plain_text, $email ) { if ( ! $order instanceof WC_Order ) { return; } // Get applied coupons $coupons = $order->get_coupon_codes(); // If NO coupons were used, remove the coupon…Continue reading