Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@xlplugins
xlplugins / wcct_best_seller_static_content.php
Created July 7, 2017 10:20
Allow Best Seller badge to Show Static Text Badge that do not process orders.
<?php
/**
** Allow Best seller badge to show wihout processing orders
**/
add_filter('wcst_show_static_best_seller_badge', 'wcst_static_best_seller_badge',10,3);
/**
* Hooked intp 'wcst_show_static_best_seller_badge'
* Decide whether to show static content or not by checking merge tagv precense in the content
@xlplugins
xlplugins / wcst_show_product_views.php
Last active July 7, 2017 10:23
Modify Existing Trigger Content To Show Product Views Just like any other trigger.
<?php
/**
* Show number of people viewing this product by modifying existing trigger content
*/
add_filter('wcst_guarantee_display_content', 'wcst_guarantee_display_content_modify', 10, 5);
/**
* Modifies and HTML for a existing trigger to show number of people viewing this product
* @hooked over `wcst_guarantee_display_content`
* @param string $gurantee_html Existing Guarantee HTML
@xlplugins
xlplugins / wcst_theme_positions_wowmall.php
Created July 13, 2017 15:09
Change WooCommerce single product positions in WOWMALL theme for XL WooCommerce Sales Trigger Plugin
<?php
add_action('wp', 'wcst_theme_helper_wowmall', 99);
function wcst_theme_helper_wowmall() {
$wcst_core = WCST_Core::get_instance();
remove_action('woocommerce_single_product_summary', array($wcst_core, 'wcst_position_below_add_cart'), 39.2);
add_action('woocommerce_single_product_summary', array($wcst_core, 'wcst_position_below_add_cart'), 39);
remove_action( 'woocommerce_single_product_summary', 'wowmall_wc_single_btns_wrapper_end', 39 );
add_action( 'woocommerce_single_product_summary', 'wowmall_wc_single_btns_wrapper_end', 38 );
@xlplugins
xlplugins / wcst_xstore_theme_add_countdown_timer_and_bar_on_grid_loop.php
Created July 14, 2017 14:35
Change action hook position of shop loop function and hook in Finale countdown timer or counter bar
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce shop loop native position
* Theme: X Store https://themeforest.net/item/xstore-responsive-woocommerce-theme/15780546
* Plugin: Finale - WooCommerce Sales Countdown Timer & Discount Plugin
*/
add_action('wp', 'wcct_xstore_modify_positions', 99);
if (!function_exists('wcct_xstore_modify_positions')) {
@xlplugins
xlplugins / wcst_modify_positions_eva_theme.php
Last active July 17, 2017 10:43
Change WooCommerce single product page positions for Eva theme for XL WooCommerce Sales Trigger Plugin
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: https://themeforest.net/item/eva-responsive-woocommerce-theme/19331563
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'eva_wcst_modify_positions', 90);
if (!function_exists('eva_wcst_modify_positions')) {
@xlplugins
xlplugins / wcst_modify_positions_betheme.php
Created July 18, 2017 10:57
Change WooCommerce single product page positions for Betheme 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/betheme-responsive-multipurpose-wordpress-theme/7758048
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'betheme_wcst_modify_positions', 90);
if (!function_exists('betheme_wcst_modify_positions')) {
function betheme_wcst_modify_positions() {
if (class_exists('WCST_Core')) {
@xlplugins
xlplugins / wcct_hide_coupon_success_info_notice.php
Created July 19, 2017 08:31
Hide WooCommerce info notice for coupons by Finale
<?php
/**
* Adding hook to hide coupon's success message by finale plugin
*/
add_action('plugins_loaded', 'wcct_hide_coupon_success',2);
if(!function_exists('wcct_hide_coupon_success')) {
/**
* hooked over `plugins_loaded`
@xlplugins
xlplugins / wcct_modify_positions_merchandiser_theme.php
Created July 21, 2017 10:36
Change WooCommerce single product page positions for Merchandiser theme for Finale: WooCommerce Sales Countdown Timer & Discount Plugin
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: https://themeforest.net/item/merchandiser-ecommerce-wordpress-theme-for-woocommerce/15791151
* Finale: WooCommerce Sales Countdown Timer & Discount Plugin
*/
add_action('wp', 'merchandiser_wcct_modify_positions', 90);
if (!function_exists('merchandiser_wcct_modify_positions')) {
@xlplugins
xlplugins / wcst_modify_positions_oxygen_theme.php
Created July 24, 2017 07:03
Change WooCommerce single product page positions for Oxygen theme for XL WooCommerce Sales Trigger Plugin
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: Oxygen https://themeforest.net/item/oxygen-woocommerce-wordpress-theme/7851484
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'oxygen_wcst_modify_positions', 90);
if (!function_exists('oxygen_wcst_modify_positions')) {
@xlplugins
xlplugins / nutrabay_site_mods.php
Last active July 24, 2017 09:49
nutrabay.com site specific snippets
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Site: nutrabay.com
* XL WooCommerce Sales Trigger Class Instance
*/
add_action('wp', 'theme_wcst_modify_positions', 90);
if (!function_exists('theme_wcst_modify_positions')) {
function theme_wcst_modify_positions() {