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
| /** | |
| * Plugin Name: FunnelKit PayPal + WooCommerce PayPal Payments — single SDK | |
| * Description: Optional fix when both plugins load PayPal JS SDK: removes the duplicate sdk/js tag and rewires FunnelKit script deps to PPCP’s loader. | |
| * | |
| * PayPal allows one https://www.paypal.com/sdk/js include per page. Two tags break window.paypal | |
| * (e.g. PPCP: "getFundingSources is not a function"). | |
| * | |
| * @package FunnelKit_PayPal_PPCP_Compat | |
| */ |
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 | |
| /** | |
| * Dequeue conflicting WeddingTropics theme assets on FunnelKit Checkout page | |
| */ | |
| add_action( 'init', function() { | |
| if ( ! class_exists( 'Custom_FunnelKit_Dequeue' ) ) { | |
| class Custom_FunnelKit_Dequeue { |
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 | |
| /** | |
| * Dequeue conflicting WeddingTropics theme assets on FunnelKit Checkout page | |
| */ | |
| add_action( 'init', function() { | |
| if ( ! class_exists( 'Custom_FunnelKit_Dequeue' ) ) { | |
| class Custom_FunnelKit_Dequeue { |
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_body_open', 'load_custom_js_below_body' ); | |
| function load_custom_js_below_body() { | |
| ?> | |
| <script> | |
| console.log('Script loaded just below body tag'); | |
| </script> | |
| <?php | |
| } |
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( | |
| 'wc_stripe_get_formatted_shipping_methods', | |
| static function ( $methods ) { | |
| if ( ! is_array( $methods ) ) { | |
| return $methods; | |
| } | |
| foreach ( $methods as $m ) { | |
| if ( ! empty( $m['id'] ) && 'flat_rate:13' === $m['id'] ) { | |
| return array( $m ); | |
| } |
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_rewards_list', function ( $data ) { | |
| if ( empty( $data['rewards'] ) || ! isset( $data['subtotal'] ) ) { | |
| return $data; | |
| } | |
| $currency = function_exists( 'get_woocommerce_currency' ) ? get_woocommerce_currency() : ''; | |
| $subtotal = (float) $data['subtotal']; | |
| // (discount = coupon reward, freegift = free gift reward). | |
| $targets = [ |
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
| /** FunnelKit TY: print PayGate crypto block before Customer Details; avoid duplicate on woocommerce_before_thankyou. */ | |
| defined( 'ABSPATH' ) || exit; | |
| /** | |
| * @return object|null Gateway instance with before_thankyou_page, or null. | |
| */ | |
| function paygatedotto_wffn_ty_paygate_gw( $order ) { | |
| if ( ! $order instanceof WC_Order ) { | |
| return 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
| add_filter( 'woocommerce_package_rates', 'wfacp_force_free_shipping_on_funnel_pages', 100, 2 ); | |
| /** | |
| * Filter shipping rates to force free shipping on target FunnelKit checkout pages. | |
| * | |
| * @param array $rates Available shipping rates. | |
| * @param array $package Shipping package data. | |
| * | |
| * @return array Filtered shipping rates. |
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 ) { | |
| // Ensure $options is an array. | |
| if ( false === $options ) { | |
| $options = []; | |
| } | |
| // Get current store/order currency (works with multi-currency plugins that hook into WooCommerce). | |
| $currency = get_woocommerce_currency(); |
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
| /**FunnelKit - trust_section on wfacp_after_gateway_list */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| const WFACP_TRUST_ID = 'trust_section'; | |
| add_action( 'wfacp_after_template_found', function () { | |
| static $d = false; | |
| if ( $d || ! class_exists( 'WFACP_Common' ) || ! function_exists( 'wfacp_form_field' ) ) { | |
| return; |
NewerOlder