Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / gravityxl-live-html-preview.php
Last active December 6, 2016 13:14
Generate Live Preview of number & total fields embedded by merge tags in Gravity Form's HTML field
/**
* @package Gravity XL Live Html Preview
* @version 1.0
* @name gravity -gravity_xl-live-html-preview
* @author Gravity XL
*/
/**
* Make html field show live calculations and totals embedded
*
*/
@xlplugins
xlplugins / wcst_modify_hard_values.php
Created May 12, 2017 11:42
Change days, hrs, mins seconds like hard text in XL WooCommerce Sales Trigger Plugin
/**
* Add below code in theme functions.php file to change days, hrs, mins seconds like hard text
**/
add_filter('wcst_modify_hard_values', 'wcst_modify_hard_values', 10, 1);
function wcst_modify_hard_values($array) {
$array['others'] = 'andre';
$array['other'] = 'annen';
$array['from'] = 'fra ';
$array['in'] = 'i';
$array['&'] = '& ';
@xlplugins
xlplugins / wcst_modify_positions_hcode_theme.php
Created May 13, 2017 07:52
Change WooCommerce single product positions in H-Code theme for XL WooCommerce Sales Trigger Plugin
/**
* Add This whole code in working theme functions.php to alter woocommerce native positions
*
* XL WooCommerce Sales Trigger Class Instance
*/
if (class_exists('WCST_Core')) {
$wcst_plugin_instance = WCST_Core::get_instance();
// removing all positions based action hooks
remove_action('woocommerce_single_product_summary', array($wcst_plugin_instance, 'wcst_position_above_title'), 2.2);
/**
* Modify best seller badge HTML contact to reorder Elements
*/
add_filter('wcst_best_seller_badge_display_content', 'wcst_best_seller_badge_display_content_modify', 10, 6);
/**
* @hooked into `wcst_best_seller_badge_display_content`
* Reorder HTML elements for Xl sales triggers's best seller badge
@xlplugins
xlplugins / wcst_modify_positions_shopkeeper_theme.php
Created June 12, 2017 20:54
Change WooCommerce single product positions in Shopkeeper theme for XL WooCommerce Sales Trigger Plugin
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: https://themeforest.net/item/shopkeeper-ecommerce-wp-theme-for-woocommerce/9553045
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'shokeeper_wcst_modify_positions', 99);
function shokeeper_wcst_modify_positions() {
if (class_exists('WCST_Core')) {
$wcst_plugin_instance = WCST_Core::get_instance();
@xlplugins
xlplugins / wcct_show_counter_bar_on_grid.php
Last active June 23, 2017 11:58
Show Inventory Bar on WooCommerce Product Grid
/**
* Customize and show inventory bar on grid
*/
add_filter("wcct_add_bar_to_grid", "custom_wcct_add_bar_to_grid");
function custom_wcct_add_bar_to_grid($config)
{
$config = array(
'skin' => 'stripe_animate',
'edge' => 'smooth',
@xlplugins
xlplugins / wcct_show_countdown_timer_on_grid.php
Last active June 23, 2017 12:03
Show Campaign Timer on WooCommerce Product Grid
/**
* Customize and show countdown timer on grid
*/
add_filter("wcct_add_timer_to_grid", "custom_wcct_add_timer_to_grid");
function custom_wcct_add_timer_to_grid($config) {
$config = array(
'skin' => 'round_fill', // you can use following values (default | square_ghost | square_fill | round_ghost | round_fill | highlight_1)
'bg_color' => '#666667',
'label_color' => '#ffffff',
@xlplugins
xlplugins / wcct_modify_shop_loop_position.php
Created June 23, 2017 15:41
This code runs with Finale: WooCommerce Countdown Timer plugin. Unhook the grid display function on native 'woocommerce_after_shop_loop_item' handle and register with new position handle
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native 'shop loop' position
* Finale WooCommerce Sales Trigger
* https://xlplugins.com/finale-woocommerce-sales-countdown-timer-discount-plugin/
*/
add_action('wp', 'theme_slug_wcct_modify_positions', 99);
if (!function_exists('theme_slug_wcct_modify_positions')) {
function theme_slug_wcct_modify_positions() {
if (function_exists('WCCT_Core')) {
@xlplugins
xlplugins / wcst_modify_positions_uncode_theme.php
Last active July 4, 2017 09:08
Change WooCommerce single product positions in UNCODE theme for XL WooCommerce Sales Trigger Plugin
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: https://themeforest.net/item/uncode-creative-multiuse-wordpress-theme/13373220
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'uncode_wcst_modify_positions', 99);
if (!function_exists('uncode_wcst_modify_positions')) {
function uncode_wcst_modify_positions() {
if (class_exists('WCST_Core')) {
@xlplugins
xlplugins / wcst_modify_positions_float_theme.php
Last active July 4, 2017 12:17
Change WooCommerce single product positions in Float theme for XL WooCommerce Sales Trigger Plugin
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: https://themeforest.net/item/float-minimalist-ecommerce-theme/19868208
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'float_wcct_modify_positions', 99);
function float_wcct_modify_positions() {
if (class_exists('WCST_Core')) {