Skip to content

Instantly share code, notes, and snippets.

Kathy helgatheviking

Block or report user

Report or block helgatheviking

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@helgatheviking
helgatheviking / readme.md
Created Feb 13, 2020
Add Name Your Price support to Braintree Subscription product types
View readme.md

Name Your Price Compatibility for Braintree Subscriptions

Contributors: Kathy Darling
Requires at least: 5.4.0
Tested up to: 5.4.0
Stable tag: 1.0.0 License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
WC requires at least: 3.9.0
WC tested up to: 3.9.0

@helgatheviking
helgatheviking / patch-missing-jpg
Created Feb 4, 2020
Wordpress patch a missing JPG in image tag on save
View patch-missing-jpg
/*
* Patch missing JPG from img
* @param int $post_ID Post ID.
* @param WP_Post $post_after Post object following the update.
*/
function kia_patch_missing_img_tags( $post_id, $post ) {
// If this is a revision, get real post ID
if ( $parent_id = wp_is_post_revision( $post_id ) ) {
$post_id = $parent_id;
}
@helgatheviking
helgatheviking / kia-disable-cog-module-for-mnm.php
Created Dec 17, 2019
Disable Cost of Goods Compat Module in Mix and Match
View kia-disable-cog-module-for-mnm.php
<?php
/**
* Plugin Name: Disable Cost of Goods Compat Module in Mix and Match
* Plugin URI: https://woocommerce.com/
* Description: Disable Cost of Goods Compat Module in Mix and Match
* Version: 1.0.0
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com/
* Requires at least: 5.3.0
* Tested up to: 5.3.0
@helgatheviking
helgatheviking / wc-minimalize-checkout.php
Created Dec 12, 2019
Reduce WooCommerce checkout to the bare minimum
View wc-minimalize-checkout.php
<?php
/**
* Plugin Name: WC Minimalize Checkout Settings
* Plugin URI: https://woocommerce.com/
* Description: Reduce checkout to the bare minimum.
* Version: 1.0.0
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com/*
* Requires at least: 5.3.0
* Tested up to: 5.3.0
@helgatheviking
helgatheviking / mnm-items-wrapper-open.php
Created Nov 8, 2019
Mix and Match Grid Options Wrapper for Avada Theme
View mnm-items-wrapper-open.php
<?php
/**
* Mix and Match Options Wrapper
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/mnm/grid/mnm-items-wrapper-open.php.
*
* HOWEVER, on occasion WooCommerce Mix and Match will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@helgatheviking
helgatheviking / wc-addons-global-per-product.php
Created Nov 8, 2019
Apply global WooCommerce Product Add-ons on a per-product basis
View wc-addons-global-per-product.php
<?php
/*
* Plugin Name: Global WooCommerce Add-ons per Product
* Plugin URI: https://www.paypal.me/helgatheviking
* Description: Apply global Product Add-ons on a per-product basis
* Version: 1.0.0
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com
* Requires at least: 5.3.0
* WC requires at least: 3.8.0
@helgatheviking
helgatheviking / wc-auto-checkout.php
Created Nov 7, 2019
Clicking checkout in the cart auto creates an order. Must have Cash On Delivery gateway enabled.
View wc-auto-checkout.php
<?php
/*
* Plugin Name: Auto Checkout for WooCommerce
* Plugin URI: https://www.paypal.me/helgatheviking
* Description: Clicking checkout in the cart auto creates an order. Must have Cash On Delivery gateway enabled.
* Version: 1.0.0
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com
* Requires at least: 5.3.0
* WC requires at least: 3.8.0
@helgatheviking
helgatheviking / wc-add-field-to-variation.php
Created Oct 30, 2019
Example of how to add custom fields to WooCommmerce variations admin and display on front end.
View wc-add-field-to-variation.php
<?php
/**
* Plugin Name: Add sample field to variations
* Plugin URI: https://kathyisawesome.com/
* Description: Example of how to add custom fields to variations admin and display on front end.
* Version: 0.1.0
* Author: helgatheviking
* Author URI: https://kathyisawesome.com
* Text Domain: extra-variation-data
*
@helgatheviking
helgatheviking / wc-only-item-in-cart.php
Created Oct 7, 2019
Forces certain WooCommerce products to be purchased as the only item in cart
View wc-only-item-in-cart.php
<?php
/**
* Plugin Name: Only Item in WooCommerce Cart
* Plugin URI: https://gist.github.com/helgatheviking/d1e41b5082a66c46afbe8e7e3c4b3244
* Description: Forces certain products to be purchased as the only item in cart
* Version: 1.0.0
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com
* Requires at least: 5.2.0
* WC requires at least: 3.6.0
@helgatheviking
helgatheviking / plugin-update-notice.php
Created Sep 29, 2019
Add Wordpress upgrade notice to plugins screen
View plugin-update-notice.php
/**
* Include the upgrade notice that will fire when 2.0.0 is released.
* This must be added before version 2.0.0 is released.
*
* @param array $plugin_data information about the plugin
* @param array $r response from the server about the new version
*/
function your_update_notice( $plugin_data, $r ) {
// Bail if the update notice is not relevant (new version is not yet 2.0 or we're already on 2.0)
You can’t perform that action at this time.