This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'wp_footer', function() { | |
| if ( ! is_product() && ! is_cart() && ! is_checkout() ) { | |
| return; | |
| } | |
| ?> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| if (!document.getElementById('kec-pay-button')) { | |
| var el = document.createElement('div'); | |
| el.id = 'kec-pay-button'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'woocommerce_before_calculate_totals', function ( $cart ) { | |
| if ( ! $cart instanceof WC_Cart || $cart->is_empty() ) { | |
| return; | |
| } | |
| $contents = $cart->cart_contents; | |
| if ( count( $contents ) < 2 ) { | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'wfocu_show_default_variation_on_load', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'fkcart_free_shipping', function ( $options ) { | |
| if ( is_null( WC()->cart ) ) { | |
| return false; | |
| } | |
| $location = WC_Geolocation::geolocate_ip( '', true, true ); | |
| $country = ! empty( $location['country'] ) ? strtoupper( $location['country'] ) : ''; | |
| if ( 'AU' !== $country ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * FKCart category based free gift rewards. | |
| * 1876 => carnes-del-corral | |
| * 29711 => carnes-del-mar | |
| */ | |
| add_filter( 'fkcart_rewards_list', 'my_fkcart_category_rewards_list', 999 ); | |
| add_filter( 'fkcart_gift_products', 'my_fkcart_category_gift_products', 999, 2 ); | |
| add_action( 'wp_footer', function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: WP ZIP Downloader | |
| * Description: Download installed plugins and themes as ZIP files without ZipArchive. | |
| * Version: 1.0.0 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Show the cumulative coupon discount inside the FunnelKit sliding cart, | |
| * just above the checkout button. | |
| */ | |
| add_action( 'fkcart_before_checkout_button', 'betterwood_fkcart_discount_anzeigen' ); | |
| function betterwood_fkcart_discount_anzeigen() { | |
| if ( is_null( WC()->cart ) || WC()->cart->is_empty() ) { | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'fkcart_enable_item_link', function ( $show, $cart_item_key, $cart_item ) { | |
| add_filter( 'woocommerce_cart_item_permalink', 'fkcart_custom_permalink', 10, 3 ); | |
| return $show; | |
| }, 10, 3 ); | |
| function fkcart_custom_permalink( $permalink, $cart_item, $cart_item_key ) { | |
| remove_filter( 'woocommerce_cart_item_permalink', 'fkcart_custom_permalink', 10 ); | |
| $urls = array( | |
| 123 => 'https://example.com/page-a/', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('wp_footer', function () { | |
| if ( ! function_exists('is_checkout') || ! is_checkout() ) return; | |
| ?> | |
| <script> | |
| (function ($) { | |
| var attached = { billing: false, shipping: false }; | |
| function ready() { | |
| return window.google && google.maps && google.maps.places; |
NewerOlder