Skip to content

Instantly share code, notes, and snippets.

@xlplugins
xlplugins / Native checkout use for upsell running but create checkout step in Funnel Builder
Last active April 14, 2022 13:24
Native checkout shows funnel upsell but must create checkout step in Funnel Builder
class WFACP_Do_Not_Override_Global_Checkout {
private $aero_id = 0;
public function __construct() {
add_action( 'wfacp_changed_default_woocommerce_page', [ $this, 'actions' ] );
add_filter( 'wfacp_template_class', [ $this, 'do_not_execute_aero_checkout' ] );
add_action( 'woocommerce_checkout_update_order_review', [ $this, 'woocommerce_checkout_update_order_review' ], - 5 );
}
@KolbySisk
KolbySisk / rhf-form-with-zod.jsx
Created January 17, 2022 16:33
React Hook Form with Zod Example
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import * as z from "zod";
const schema = z.object({
email: z.string().email().min(2),
password: z.string().min(6)
});
export default function RhfFormWithZod() {
<?php
function yourprefix_menu_arrow($item_output, $item, $depth, $args) {
if (in_array('menu-item-has-children', $item->classes)) {
$arrow = '
<div class="nav-arrow">
<svg fill="#8198b8" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path d="m79.699 43.5-5.6992-5.6016-23.801 24.301-24.301-23.801-5.5977 5.8008 30.098 29.301z" fill="#8198b8"/>
</svg>
</div>'; // Change the class to your font icon
var passField = $form.find('input[data-name=password]');
passField.wrap("<div class='ff_input-group'></div>");
passField.after('<div class="ff_input-group-append"><span class="ff_input-group-text"><i style="cursor:pointer;" class="dashicons dashicons-hidden toggle-password"> </i></span></div>');
$form.find(".toggle-password").click(function() {
$(this).toggleClass("dashicons-visibility dashicons-hidden");
if (passField.attr("type") == "password") {
passField.attr("type", "text");
} else {
@jennlee20
jennlee20 / wordpress-fluentform-javascript-triggers.js
Last active September 11, 2024 11:52
wordpress-fluentform-javascript-triggers.js
$form.on('ff_to_next_page', function(activeStep, form) {
console.log(activeStep);
// You can run your own JS on step change
});
$form.on('ff_to_prev_page', function(activeStep, form) {
console.log(activeStep);
// You can run your own JS on step change
});
@MailPoet-Staff
MailPoet-Staff / sign-up-confirmation
Last active February 27, 2022 15:50
MailPoet signup confirmation email
<!doctype html><html><head><meta charset="UTF-8"><title>Thanks for signing up</title></head><body bgcolor="#ffede3">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffede3"><tr><td>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff"><tr><td colspan="3"><a href="http://www.mailpoet.com"><img style="display:block;border:0;outline:none;-ms-interpolation-mode:bicubic;" src="https://www.mailpoet.com/wp-content/uploads/2019/01/mailpoet-logo-orange-header.png" width="600" height="118" alt="MailPoet" /></a></td></tr><tr><td width="20"></td>
<td style="color:#071c6d;font-family:arial,sans-serif;font-size:15px;">
<b>Hello!</b>
Thanks for signing up.
@techjewel
techjewel / fluentform-submission-success.js
Last active August 21, 2025 03:57
Form submission success JS Event in Fluent Forms
// Event on form submission success
// You can paste this script to Form's custom JS Box
$form.on('fluentform_submission_success', function() {
// You can run your own JS and will be run on successful form submission
});
@SashkoWooTeam
SashkoWooTeam / jet-woo-builder-and-wcbm-compatibility.php
Created August 22, 2019 12:24
JetWooBuilder and Yith Shop Badges compatibility
if ( !function_exists( 'yith_wcbm_shop_badge_container_start' ) && !function_exists( 'yith_wcbm_shop_badge_container_end' ) ) {
add_action( 'jet-woo-builder/templates/products/before-item-thumbnail', 'yith_wcbm_shop_badge_container_start', 1 );
add_action( 'jet-woo-builder/templates/products/before-item-thumbnail', 'yith_wcbm_shop_badge_container_end', 2 );
function yith_wcbm_shop_badge_container_start() {
do_action( 'yith_wcbm_theme_badge_container_start' );
}
function yith_wcbm_shop_badge_container_end() {
do_action( 'yith_wcbm_theme_badge_container_end' );
}
}
@SashkoWooTeam
SashkoWooTeam / open-popup-after-wc-update-cart.js
Created August 7, 2019 08:54
Open Jet Popup on WooCommerce Update Cart action
$( document ).on( 'wc_update_cart added_to_cart', function() {
var popupId = 'jet-popup-1455';
$( window ).trigger( {
type: 'jet-popup-open-trigger',
popupData: {
popupId: popupId
}
} );
});
@SashkoWooTeam
SashkoWooTeam / jet-smart-filters-wholesale-pro-compatibility.php
Created July 30, 2019 11:16
JetSmartFilters compatibility with Wholesale Pro
add_action( 'jet-smart-filters/provider/epro-archive-products/before-ajax-content', 'theme_name_jet_smart_filters_compatibility' );
function theme_name_jet_smart_filters_compatibility() {
if ( class_exists( 'IGN_Wholesale_Pro_Suite' ) ) {
$settings = get_option( 'woocommerce_ignitewoo_wholesale_pro_suite_settings' );
if ( ! empty( $settings['login_required_for_prices'] ) && 'yes' == $settings['login_required_for_prices'] && ! is_user_logged_in() ) {
if ( wp_doing_ajax() ) {