Skip to content

Instantly share code, notes, and snippets.

View ChadReitsma's full-sized avatar

Chad Reitsma ChadReitsma

View GitHub Profile
@mattiasghodsian
mattiasghodsian / functions.php
Last active October 10, 2024 22:10
[Woocommerce] Product Select2 input field
/**
* Title: [Woocommerce] Product Select2 input field
* Author: Mattias Ghodsian
* Description: Let's users search products in wp-admin / Woocommerce Product data
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*/
function woocommerce_wp_product_select2( $field ) {
global $thepostid, $post, $woocommerce;
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by craig@123marbella.com on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/