Skip to content

Instantly share code, notes, and snippets.

View israelmartins96's full-sized avatar
💭
I may be slow to respond.

Israel Martins israelmartins96

💭
I may be slow to respond.
View GitHub Profile
@israelmartins96
israelmartins96 / popup-maker-age-verification-modals-customise-feedback-messages.php
Created June 18, 2024 20:28
Popup Maker Age Verification Modals Customise Feedback Messages
<?php
/*
* A filter to modify Popup Maker's Age Verification Popups' feedback messages (success and error).
*
* The first argument in each magic function -- __() -- is the success/error message. Change as any or all messages desired.
*
* @version Popup Maker Age Verification Modals (1.2.4)
*
* @see popup-maker-age-verification-modals/popup-maker-age-verification-modals.php
@israelmartins96
israelmartins96 / popup-maker-open-popup-with-a-delay-after-another-popup-is-closed.js
Created May 18, 2024 19:00
Popup Maker Open Popup with a Delay After Another Popup is Closed
/*
* Trigger a [Popup Maker] popup when another popup is closed + Delay
*
* Reference: https://docs.wppopupmaker.com/article/554-launch-a-popup-from-a-popup-or-when-a-popup-closes
*/
jQuery(document).ready(function ($) {
/**
* Popup A: The popup that you want to trigger another popup when closed.
@israelmartins96
israelmartins96 / wc-vendors-bulk-activate-all-inactive-vendors.php
Last active June 19, 2024 18:31
WC Vendors Bulk Activate All Inactive Vendors
<?php
// Run once! (Use a plugin like Code Snippets https://wordpress.org/plugins/code-snippets/)
function wcv_activate_all_vendors() {
global $wpdb;
$vendors = get_users( array( 'fields' => array( 'ID' ), 'role' => 'Vendor' ) );
$meta_key = '_wcv_vendor_status';
@israelmartins96
israelmartins96 / popup-maker-close-a-popup-when-the-mouse-cursor-is-moved-away-from-the-popup.js
Created January 10, 2024 19:24
Popup Maker Close a Popup When the Mouse Cursor is Moved Away from the Popup
/*
* Close a [Popup Maker] popup when the mouse cursor is moved away from the popup.
*/
jQuery(document).ready(function( $ ){
/* The popup object
*
* ID: The popup ID
* selector: The CSS selector of the popup's container
@israelmartins96
israelmartins96 / popup-maker-woocommerce-open-a-popup-by-country-selected-excluding-a-country-during-checkout.js
Last active January 10, 2024 19:21
Popup Maker WooCommerce Open a Popup by Country Selected Excluding a Country During Checkout
jQuery(document).ready(function ($) {
/* Checkout popup will not display for this country */
const excludedCountry = 'GB';
/* Popups (popups IDs) by country */
const checkoutPopups = {
default: 914,
algeria: 902,
albania: 912
@israelmartins96
israelmartins96 / popup-maker-delay-trigger-when-a-popup-is-triggered-from-another-popup.js
Last active January 10, 2024 19:18
Popup Maker Delay Trigger When A Popup is Triggered from Another Popup
/*
* Trigger a [Popup Maker] popup from another popup (or when the popup is closed) + Delay
*
* Reference: https://docs.wppopupmaker.com/article/554-launch-a-popup-from-a-popup-or-when-a-popup-closes
*/
jQuery(document).ready(function ($) {
/* Opens a popup after a delay */
const delayOpenPopup = (popupID, delay) => {