Skip to content

Instantly share code, notes, and snippets.

Avatar

Manos Psychogyiopoulos franticpsyx

View GitHub Profile
@franticpsyx
franticpsyx / woocommerce-component-props-discount-method.php
Created Feb 29, 2020
Calculate discounted Component Option prices on session load.
View woocommerce-component-props-discount-method.php
<?php
/**
* Plugin Name: WooCommerce Composite Products - Early Discount Calculations
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Calculate discounted Component Option prices on session load.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / woocommerce-bundles-props-discount-method.php
Last active Feb 29, 2020
Calculate discounted bundled cart item prices on session load.
View woocommerce-bundles-props-discount-method.php
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Early Discount Calculations
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Calculate discounted bundled cart item prices on session load.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / woocommerce-bundles-discount-over-regular-prices.php
Last active Feb 29, 2020
Use this snippet to apply bundled item discounts on regular prices.
View woocommerce-bundles-discount-over-regular-prices.php
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Discounts over Regular Prices
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Use this snippet to apply bundled item discounts on regular prices.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / wc_pb_dependency_relationship_and.php
Created Dec 20, 2017
Switch on AND dependency relationship in WC Product Dependencies
View wc_pb_dependency_relationship_and.php
add_filter( 'wc_pd_dependency_relationship', 'wc_pb_dependency_relationship_and', 10, 2 );
function wc_pb_dependency_relationship_and( $relationship, $product ) {
$relationship = 'and';
return $relationship;
}
@franticpsyx
franticpsyx / composites_sale_status_tweak.php
Last active Feb 29, 2020
Use this snippet to prevent composites with component discounts from appearing as on-sale.
View composites_sale_status_tweak.php
<?php
/**
* Plugin Name: WooCommerce Composite Products - Sale Status Tweak
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Prevents Composite Products with component discounts from appearing as on-sale.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / woocommerce-composites-prevent-subtotals-mods.php
Last active Feb 29, 2020
Prevents Composite Products from modifying the appearance of cart/order item subtotals. Requires v3.7+.
View woocommerce-composites-prevent-subtotals-mods.php
<?php
/**
* Plugin Name: WooCommerce Composite Products - Prevent Cart/Order Item Subtotal Modifications
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Prevents Composite Products from modifying the appearance of cart/order item subtotals. Requires v3.7+.
* Version: 1.1
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / woocommerce-bundles-prevent-subtotals-mods.php
Last active Feb 29, 2020
Prevents Product Bundles from aggregating item subtotals in cart/order templates.
View woocommerce-bundles-prevent-subtotals-mods.php
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Prevent Subtotals Aggregation
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Prevents Product Bundles from displaying aggregated item subtotals in cart/order templates. Requires v5.5+.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / bundles-stock-cache-debug.php
Last active Feb 29, 2020
Use this plugin to disable the bundled item stock status caching mechanism introduced in Product Bundles v5.0+.
View bundles-stock-cache-debug.php
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Disable Stock Cache
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Use this plugin to disable the bundled item stock status caching mechanism introduced in Product Bundles v5.0+.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
*
* Requires at least: 4.1
@franticpsyx
franticpsyx / woocommerce-bundles-optional-checkbox-state.php
Last active Feb 29, 2020
Use this plugin to have optional bundled items checked/selected by default.
View woocommerce-bundles-optional-checkbox-state.php
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Optional Items Checked by Default
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Use this plugin to have optional bundled items checked/selected by default.
* Version: 1.1
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@franticpsyx
franticpsyx / woocommerce-composites-autotransition.php
Last active Feb 29, 2020
Use this snippet to automatically move to the next step after making a valid selection.
View woocommerce-composites-autotransition.php
<?php
/**
* Plugin Name: WooCommerce Composite Products - Autotransition
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Use this snippet to automatically move to the next step after making a valid selection.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
You can’t perform that action at this time.