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 | |
/** | |
* Remove woocommerce and woo-subscriptions delete actions. | |
* @return [type] [description] | |
*/ | |
function mts_remove_delete_actions() { | |
remove_action( 'delete_user', 'WC_Subscriptions_Manager::trash_users_subscriptions' ); | |
remove_action( 'deleted_user', 'wc_reset_order_customer_id_on_deleted_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 | |
/** | |
* Add $number param to woocommerce-subscriptions. | |
* | |
* @param int (optional) An interval in the range 1-6 | |
* @param string (optional) One of day, week, month or year. If empty, all subscription ranges are returned. | |
* @since 2.0 | |
*/ | |
function wcs_get_subscription_period_strings( $number = 1, $period = '' ) { |
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 | |
/** | |
* 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
// 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 | |
// Make sure WooCommerce is active | |
if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) return; | |
//Adds Child Gateway Class | |
add_action( 'plugins_loaded', 'init_call_for_payment_info' ); | |
function init_call_for_payment_info() { | |
class WC_Gateway_Call_for_Payment_Info extends WC_Payment_Gateway { | |
//Construct Gateway |
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
# 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. |
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' )) { | |
OlderNewer