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: GW Modify Subscription Pricing | |
Plugin URI: http://kovick.com/ | |
Description: A plugin for WooCommerce + Subscription Add-on + Gravity Form Products Add-on which only adds the pricing to the signup fee rather than to the recurring fee. | |
Version: 1.0 | |
Author: David Smith | |
Author URI: http://ounceoftalent.com | |
License: GPL2 |
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 | |
################################################################################ | |
// Custom WordPress Local Config | |
// Use only for Development | |
// https://gist.github.com/bhubbard/8428583 | |
################################################################################ | |
/* Database Connection Info */ | |
define('DB_NAME', ''); | |
define('DB_USER', ''); |
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 | |
/** | |
* My Subscriptions | |
*/ | |
?> | |
<div class="woocommerce_account_subscriptions"> | |
<h2><?php _e( 'My Subscriptions', 'woocommerce-subscriptions' ); ?></h2> | |
<?php if ( ! empty( $subscriptions ) ) : ?> |
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( 'woocommerce_product_options_general_product_data', __CLASS__ . '::subscription_pricing_fields' ); | |
function remove_prcing(){ | |
remove_action('woocommerce_product_options_general_product_data','WC_Subscriptions_Admin::subscription_pricing_fields' ); | |
} | |
add_action('init', 'remove_prcing'); | |
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 | |
// Display variations dropdowns on shop page for variable products | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
function woo_display_variation_dropdown_on_shop_page() { | |
global $product; | |
if( $product->is_type( 'variable' )) { | |
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
// https://github.com/woothemes/woocommerce/issues/3641 | |
// http://stackoverflow.com/questions/36300773/woocommerce-programmatically-changing-the-default-shipping-method | |
// guts of function straight copy of function get_default_method from WC v. 2.5.5 includes/class-wc-shipping.php | |
function plx_default_cheapest_shipping_method( $current_chosen_method, $available_methods ) { | |
$selection_priority = get_option( 'woocommerce_shipping_method_selection_priority', array() ); | |
if ( ! empty( $available_methods ) ) { |
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 | |
/** | |
* Variable subscription product add to cart | |
* | |
* @author Prospress | |
* @package WooCommerce-Subscriptions/Templates | |
* @version 2.0.9 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
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
import std; | |
acl whitelist { | |
"123.123.123.123"; | |
"216.3.128.12"; | |
} | |
sub vcl_recv { | |
# If not a whitelisted IP, then display maintenance page. Requires std library. | |
if(std.ip(regsub(req.http.X-Forwarded-For, "[, ].*$", ""), client.ip) !~ whitelist) { |
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
# wp-secure.conf | |
# | |
# | |
# This file includes common security considerations for wordpress using nginx. | |
# | |
# The goal is to block actions which are usually dangerous to wordpress. | |
# Additionally, we block direct access to PHP files and folders which should not | |
# be accessed directly from a browser. | |
# | |
# Also have included exceptions for plugins that are known to require this access. |
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
# WordPress single site rules. | |
# Designed to be included in any server {} block. | |
# This order might seem weird - this is attempted to match last if rules below fail. | |
# http://wiki.nginx.org/HttpCoreModule | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
# Add trailing slash to */wp-admin requests. |
OlderNewer