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 | |
/** | |
* 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 | |
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 | |
// 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 | |
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 | |
/** | |
* 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'){ |
NewerOlder