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
| /** | |
| * ONE-TIME cleanup: remove duplicate FKCart conversion rows. | |
| * Keeps the earliest row per order; backs up removed rows first (reversible). | |
| * | |
| * Admin only: | |
| * /wp-admin/?fkcart_dedupe_conversions=report → counts only, no changes | |
| * /wp-admin/?fkcart_dedupe_conversions=delete → backs up, then removes duplicates | |
| * /wp-admin/?fkcart_dedupe_conversions=restore → undo (re-inserts from backup) | |
| * | |
| * Remove this snippet (and drop the *_dedup_bak tables) once you're done. |
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
| class FB_Coupon_Diagnostics { | |
| /** Logger source / log-file slug. */ | |
| private static $source = 'fb-coupon-diagnostics'; | |
| /** Per-request correlation id — unique to one HTTP request. */ | |
| private static $rid = null; |
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 | |
| /** | |
| * Sublium - Coupon restrictions for Subscribe & Save items | |
| * | |
| * Rules: | |
| * - Percentage coupons do not apply to Subscribe & Save items. | |
| * - Fixed coupons are blocked when a Subscribe & Save item exists in cart. | |
| * - Fixed coupons already applied are automatically removed. | |
| * - Percentage coupons are invalid when all cart items are Subscribe & Save items. | |
| */ |
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
| /** | |
| * Disable Google / Chrome auto-translate on FunnelKit Checkout pages only. | |
| * Adds Google's page-level opt-out meta tag to the checkout <head>. | |
| */ | |
| add_action( 'wfacp_checkout_page_found', function ( $checkout_id ) { | |
| add_action( 'wp_head', function () { | |
| echo '<meta name="google" content="notranslate">' . "\n"; | |
| }, 1 ); | |
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
| /** | |
| * TEMP DIAGNOSTIC — check Mollie mandates for a given order's customer right now. | |
| * Run on the LIVE site as an admin: /wp-admin/?fk_check_mandate=5644 | |
| * Remove after testing. | |
| */ | |
| add_action( 'admin_init', function () { | |
| if ( ! isset( $_GET['fk_check_mandate'] ) || ! current_user_can( 'manage_woocommerce' ) ) { | |
| 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
| /** | |
| * Relocate billing_company / shipping_company on FunnelKit Checkout — | |
| * ONLY on the checkout IDs you list below. | |
| */ | |
| add_filter( 'wfacp_get_fieldsets', function ( $fieldsets ) { | |
| /* ---- EDIT THIS ---------------------------------------------------- | |
| * 1) Which checkouts should this run on? Put their checkout IDs here. | |
| * Find the ID in the editor URL: admin.php?page=wfacp&wfacp_id=123 | |
| */ |
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
| /** | |
| * Modify WFOCU cron schedule interval from 4 minutes to 20 minutes. | |
| * | |
| * The plugin registers a custom cron schedule 'wfocu_cron_schedule_times' at 4-minute | |
| * intervals. This filter runs at priority 10000 (after WFOCU's own registration) to | |
| * override the interval. The change takes effect on the next execution of the | |
| * 'fk_fb_every_4_minute' event without requiring a manual reschedule. | |
| */ | |
| add_filter( 'cron_schedules', function( $schedules ) { | |
| if ( isset( $schedules['wfocu_cron_schedule_times'] ) ) { |
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
| if ( ! class_exists( 'WFACP_Session_Guard' ) ) { | |
| class WFACP_Session_Guard { | |
| private static $instance = null; | |
| public static function get_instance() { | |
| if ( null === self::$instance ) { | |
| self::$instance = new self(); | |
| } |
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'; |
NewerOlder