Skip to content

Instantly share code, notes, and snippets.

<?php
/* wp_signon can only be executed before anything is outputed in the page because of that we're adding it to the init hook */
global $wppb_login;
$wppb_login = false;
function wppb_signon(){
global $error;
global $wppb_login;
@sunbbon
sunbbon / gist:b21a235dea4f082a98d27338ebfa63d0
Created January 16, 2018 06:06 — forked from amdrew/gist:e13a2a72de4b46a891ae
Easy Digital Downloads - Force account creation by cart total
<?php
/*
* Plugin Name: Easy Digital Downloads - Force account creation by cart total
* Description: Force account creation at checkout if the cart total is a certain amount
* Author: Andrew Munro
* Version: 1.0
*/
function sumobi_edd_force_account_creation_by_cart_total( $ret ) {
// enter the cart total amount that should force account creation
@sunbbon
sunbbon / gist:d917fabe3c0f6bbeb707ef32befc3e17
Created January 16, 2018 06:07 — forked from amdrew/gist:455356068e91113f04b9
Easy Digital Downloads - link products at checkout back to their respective single download pages
<?php
// change this:
echo '<span class="edd_checkout_cart_item_title">' . esc_html( $item_title ) . '</span>';
// to this:
echo '<a href="' . get_the_permalink( $item['id'] ) . '"><span class="edd_checkout_cart_item_title">' . esc_html( $item_title ) . '</span></a>';