Skip to content

Instantly share code, notes, and snippets.

@manospsyx
manospsyx / woocommerce-composite-products-js-api-bootstrapping.js
Last active February 1, 2018 00:25
Composite Products JS API - Script Bootstrapping
;( function ( $, window, document, undefined ) {
$( '.composite_data' )
.on( 'wc-composite-initializing', function( event, composite ) {
// Add your code here.
} );
} ) ( jQuery, window, document );
@manospsyx
manospsyx / woocommerce-bundles-override-default-quantity.php
Last active February 29, 2020 20:36
Use this snippet to override the initial quantity value of a bundled item (by default equal to the minimum quantity).
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Default Bundled Item Quantity Override
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Use this snippet to override the initial quantity value of a bundled item (by default equal to the minimum quantity).
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-composites-custom-price-html.php
Last active February 29, 2020 20:39
Use this snippet to define your own custom price strings for Composite products, for instance when the "Hide Price" option is checked to reduce server load.
<?php
/**
* Plugin Name: WooCommerce Composite Products - Custom Composite Price Strings
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Use this snippet to define your own custom price strings for Composite products, for instance when the "Hide Price" option is checked to reduce server load.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-bundles-discount-over-sale-prices.php
Last active February 29, 2020 20:39
Use this snippet to allow bundled item discounts over sale prices.
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Discounts over Sale Prices
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Use this snippet to allow bundled item discounts over sale prices.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-composites-hide-free-price-strings.php
Last active February 29, 2020 20:39
Use this snippet to hide "Free!" price strings from drop-downs and selected product details when the "Per-Item Pricing" option is checked.
<?php
/**
* Plugin Name: WooCommerce Composite Products - Hide "Free!" Price Strings
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Hide "Free!" price strings from drop-downs and selected product details when the "Per-Item Pricing" option is checked.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-bundles-remove-optional-suffix.php
Last active February 29, 2020 20:39
Use this snippet to remove the "- optional" suffix displayed next to the title of optional bundled items.
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Remove Optional Suffix
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Use this snippet to remove the "- optional" suffix displayed next to the title of optional bundled items.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-composites-sort-by-title.php
Last active February 29, 2020 20:40
Use this snippet to make the "default" Component Options sorting option operate based on "title".
<?php
/**
* Plugin Name: WooCommerce Composite Products - Sort Component Options by Product Title
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Use this snippet to make the "default" Component Options sorting option operate based on "title".
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-composites-sort-by-menu-order.php
Last active February 29, 2020 20:40
Use this snippet to make the "default" Component Options sorting option operate based on "menu_order".
<?php
/**
* Plugin Name: WooCommerce Composite Products - Sort Component Options by Menu Order
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Use this snippet to make the "default" Component Options sorting option operate based on "menu_order".
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-bundles-variable-container-weight.php
Last active February 29, 2020 20:41
Use this snippet to have the weight of bundled products added to the container weight when the Non-Bundled Shipping option is unchecked.
<?php
/**
* Plugin Name: WooCommerce Product Bundles - Variable Container Weight
* Plugin URI: https://woocommerce.com/products/product-bundles/
* Description: Use this snippet to have the weight of bundled products added to the container weight when the Shipped Individually item option is unchecked.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*
@manospsyx
manospsyx / woocommerce-composites-hide-incompatible-component-options.php
Last active February 29, 2020 20:41
Use this snippet to have incompatible selections completely hidden, instead of greyed-out, when using Scenarios.
<?php
/**
* Plugin Name: WooCommerce Composite Products - Hide Component Options Disabled by Scenarios
* Plugin URI: https://woocommerce.com/products/composite-products/
* Description: Use this snippet to have incompatible selections completely hidden, instead of greyed-out, when using Scenarios.
* Version: 1.0
* Author: SomewhereWarm
* Author URI: https://somewherewarm.gr/
* Developer: Manos Psychogyiopoulos
*