Archives: Snippets
Disable Deactivation Links
add_filter( ‘plugin_action_links’, ‘disable_all_plugin_deactivation’, 10, 4 ); function disable_all_plugin_deactivation( $actions, $plugin_file, $plugin_data, $context ) { if ( get_current_user_id() !== 1 ) { // Replace 1 with your admin user ID unset( $actions[‘deactivate’] ); } return $actions; }Continue reading
om trigger alt conversion
Check out our latest guide!Continue reading
om-trigger-conversion class on submit button
First Name Email AddressContinue reading
Untitled Snippet
Claim your discountContinue reading
Form action onSubmit
First Name Email AddressContinue reading
To create the map and mapper as written by kodee
document.addEventListener(‘DOMContentLoaded’, function () { const map = L.map(‘treasure-map’).setView([51.5033, -0.1196], 12); L.tileLayer(‘https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png’, { attribution: ‘© OpenStreetMap contributors’ }).addTo(map); const items = document.querySelectorAll(‘.treasure-item’); const markers = []; items.forEach(function (item) { const lat = Number(item.dataset.lat); const lng = Number(item.dataset.lng); if (!Number.isFinite(lat) || !Number.isFinite(lng))…Continue reading
A PHP snippet code to be pasted according to the AI kobee
add_action(‘wp_enqueue_scripts’, function () { if (!is_page(2029)) { return; } wp_enqueue_style( ‘leaflet-css’, ‘https://unpkg.com/[email protected]/dist/leaflet.css’, array(), ‘1.9.4’ ); wp_enqueue_script( ‘leaflet-js’, ‘https://unpkg.com/[email protected]/dist/leaflet.js’, array(), ‘1.9.4’, true ); wp_add_inline_script(‘leaflet-js’, ” document.addEventListener(‘DOMContentLoaded’, function () { const mapElement = document.getElementById(‘treasure-map’); if (!mapElement || typeof L === ‘undefined’) return;…Continue reading
Untitled Snippet
Item detailsContinue reading
WWPAY – Change Order status (On Hold → Processing)
/** * Plugin Name: Wholesale Payments — send $0-today plan orders to Processing * Description: Temporary workaround. Moves a Wholesale Payments order from On Hold * to Processing when the hold was caused only by “no payment is due *…Continue reading