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 | |
/** | |
* Figures out if the current time is during our black out period which we do not want to text users | |
* | |
* @return bool | |
*/ | |
static public function isDuringBlackOutTime() { | |
$currentTime = Carbon::now(); | |
if($currentTime->format('A') == 'AM'){ |
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 | |
function rss_pre_get_posts($query) { | |
if (isset($_GET['days_past']) && is_feed()) { | |
$query->set('date_query', array(array('after' => $_GET['days_past'] . ' days ago',))); | |
} | |
if (isset($_GET['offset']) && is_feed()) { | |
$query->set('offset', $_GET['offset']); | |
} | |
if (isset($_GET['cat']) && is_feed()) { | |
$query->set('cat', $_GET['cat']); |
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 the image and thumbnail node to RSS feed | |
function add_rss_node_image_thumbnail() { | |
global $post; | |
if (has_post_thumbnail($post->ID)): | |
echo "<image>" . get_the_post_thumbnail_url($post->ID, 'medium') . "</image>\n"; | |
endif; | |
} | |
add_action('rss2_item', 'add_rss_node_image_thumbnail'); |
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( 'woocommerce_checkout_fields' , 'woo_remove_billing_checkout_fields' ); | |
/** | |
* Remove unwanted checkout fields | |
* | |
* @return $fields array | |
*/ | |
function woo_remove_billing_checkout_fields( $fields ) { |
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: Extend WooCommerce Subscription Intervals | |
* Description: Add custom billing & subscription intervals to WooCommerce Subscriptions | |
* Author: Matt Pramschufer | |
* Author URI: https://emoxie.com | |
* Version: 1.0 | |
* License: GPL v2 | |
*/ |
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: WooCommerce Subscription Export | |
Plugin URI: https://emoxie.com | |
Description: Custom plugin to export shipping data for Magazine Subscribers | |
Version: 1.0.0 | |
Author: Matt Pramschufer | |
Author URI: | |
*/ | |
defined( 'ABSPATH' ) or exit; |
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( 'show_user_profile', 'extra_user_profile_fields' ); | |
add_action( 'edit_user_profile', 'extra_user_profile_fields' ); | |
function extra_user_profile_fields( $user ) { ?> | |
<h3><?php _e("LEGACY IMPORTED USER DATA", "blank"); ?></h3> | |
<table class="form-table"> | |
<tr> |
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('woocommerce_subscriptions_product_price_string', 'modified_subscription_strings', 10, 3); | |
function modified_subscription_strings($subscription_string, $product, $include){ | |
switch($product->get_slug()){ | |
case 'green-magazine-subscription': | |
case 'classic-farm-tractor-subscription': | |
case 'little-green-magazine-subscription': | |
return '$' . number_format($product->get_price(), 2, '.', '') . ' / year'; | |
break; |
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: WooCommerce Email Customer Address | |
* Description: Email the site admin when a customer changes their address | |
* Author: Matt Pramschufer | |
* Version: 1.0.0 | |
* | |
*/ | |
function greenmagazine_email_customer_address( $user_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
<?php | |
/** | |
* Do not edit this file directly. You can copy this file to your theme directory | |
* in /your-theme/woocommerce-pay-per-post/shortcode-purchased.php | |
* The $purchased variable is a WP Posts Object of purchased posts. | |
*/ | |
?> | |
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"> | |
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script> | |
<div class="wc-ppp-purchased-container"> |
OlderNewer