Skip to content

Instantly share code, notes, and snippets.

View xlplugins's full-sized avatar

XLPlugins xlplugins

View GitHub Profile
@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() {
@xlplugins
xlplugins / wcct_handle_transients_for_caching.php
Created August 4, 2017 15:48
Handling for the plugin transients against caching plugins.
<?php
/**
* Handling with super cache plugin
*/
add_action('the_post', 'wcct_handle_transients_on_product_page',1);
function wcct_handle_transients_on_product_page($post) {
if(!defined("WCCT_SLUG")) {
return;
@xlplugins
xlplugins / wcct_show_countdown_timer_on_grids.php
Last active September 18, 2017 07:51
Show Countdown Timer on WooCommerce Products Grids Using ShortCodes
<?php
/**
* Call Countdown Timer in product loop below product name using shortcode.
* This inherit product's timer settings and follow campaign rules.
*/
add_action('woocommerce_after_shop_loop_item', 'wcct_shop_loop_timer_display', 5);
if (!function_exists('wcct_shop_loop_timer_display')) {
function wcct_shop_loop_timer_display() {
echo do_shortcode('[finale_countdown_timer skip_rules="no"]');
@xlplugins
xlplugins / xl_remove_license_notice.php
Last active July 29, 2019 14:13
Remove XlPlugins's notification for Missing/Invalid license.
<?php
add_action('admin_menu', 'xl_license_notice_remove');
function xl_license_notice_remove() {
global $wp_filter;
if ( ! isset( $wp_filter['admin_init'] ) ) {
return;
}
@xlplugins
xlplugins / xl-wpml-compatibility-for-options.php
Last active September 26, 2017 13:54
This is how we fetch translatable strings from WPML for our options.
<?php
/**
* Compatibility with WPML
*/
if (function_exists('icl_t')) {
$translated_google_map_error_text = icl_t('admin_texts_xlwcty_global_settings', '[xlwcty_global_settings]google_map_error_txt', $options['google_map_error_txt']);
$options['google_map_error_txt'] = $translated_google_map_error_text;
}