This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Foo { | |
var $bar; | |
function Foo() { | |
add_action('shopp_init', array($this, 'register_session_variable') ); | |
} | |
function register_session_variable() { | |
Shopping::restore('bar', $this->bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add to functions.php | |
add_action('shopp_storefront_init', 'shopp_storefront_wp37_compat'); | |
function shopp_storefront_wp37_compat() { | |
add_filter('archive_template', array(ShoppStorefront(), 'pages') ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product_ids = array(12, 14); | |
ShoppCollection( new ProductCollection ); | |
ShoppCollection()->slug = 'adhoc-collection'; | |
ShoppCollection()->load( array( | |
'where' => array('p.id IN (' . implode(',', $product_ids) . ')') | |
)); | |
shopp('storefront.collection'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't include opening PHP tag! | |
$thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
VirtualDocumentRoot /Applications/XAMPP/xamppfiles/htdocs/sites/%-2+ | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Gist Watermark | |
Plugin URI: http://clifgriffin.com | |
Description: Nothing really. | |
Version: 1.0 | |
Author: Clifton H. Griffin II | |
Author URI: http://clifgriffin.com | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('shopp_order_event_emails','disable_customer_order_notifications'); | |
function disable_customer_order_notifications ($messages) { | |
print_r($messages); | |
unset($messages['customer']); | |
print_r($messages); die; | |
return $messages; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_ajax_update_shipping', 'update_shipping'); | |
add_action('wp_ajax_nopriv_update_shipping', 'update_shipping'); | |
function update_shipping() { | |
// Update shipping | |
$dest = array( | |
'shipping' => array( | |
'postcode' => $_REQUEST['postcode'], | |
'country' => $_REQUEST['country'] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'acf/save_post', 'hb_shopp_card_variations', 20 ); | |
function hb_shopp_card_variations() { | |
gc_enable(); | |
if( ! isset($_REQUEST['fields']) ) return; | |
ini_set('memory_limit', '356M'); | |
set_time_limit(0); |
OlderNewer