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: You can book me webhook endpoint | |
| * Description: Receives webhook from YouCanBookMe and saves as optin conversion | |
| */ | |
| 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
| add_action( 'wp_head', 'wffn_custom_script_on_landing_option_page' ); | |
| function wffn_custom_script_on_landing_option_page() { | |
| global $post; | |
| if ( is_null( $post ) ) { | |
| return; | |
| } | |
| // Check if the post ID matches the specific sales page ID (replace 123 with your desired page ID) | |
| $target_page_id = 104; // Replace with the sales page ID where you want the script to run | |
| if ( $post->ID != $target_page_id ) { |
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
| /** | |
| * Change free shipping text in mini cart summary to "FREE pick-up at RMWSB" | |
| * Only applies in the summary section, NOT in the shipping calculator | |
| */ | |
| add_filter( 'wc_cart_totals_shipping_method_cost', function( $output, $method ) { | |
| // Safety checks: Only run on FunnelKit checkout pages | |
| if ( ! class_exists( 'WFACP_Common' ) ) { | |
| return $output; | |
| } | |
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 WFACP_Compatibility_With_Alegra_WC_Sync { | |
| private $alegra_fields = []; | |
| private $registered_fields = []; | |
| public function __construct() { | |
| // Hook early to capture Alegra fields | |
| add_action( 'wfacp_after_checkout_page_found', [ $this, 'capture_alegra_fields' ], 5 ); | |
| // Ensure Alegra fields are properly registered |
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 FKCART_Bulgarian_Eurozone_Integration { | |
| private $instance = null; | |
| public function __construct() { | |
| // Hook into FunnelKit cart initialization | |
| add_filter( 'fkcart_enable_item_link', [ $this, 'add_item_meta' ] ); | |
| // Hook into FunnelKit checkout button total display | |
| // This filter is used in cart-cta.php line 54 to display the cart total |
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
| /** | |
| * Block temporary/disposable email domains during WooCommerce checkout | |
| * Add this to your theme's functions.php file | |
| */ | |
| // Blocked email domains list | |
| function fk_wc_get_blocked_email_domains() { | |
| $domains = array( | |
| 'mailnetter.com', | |
| 'mailnetter.net', |
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( 'theme_mod_penci_woocommerce_standard_page', function( $value ) { | |
| // Check if we're on checkout page | |
| if ( is_checkout() ) { | |
| $value=false; | |
| } | |
| return $value; | |
| }, 999 ); |
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
| // Custom Shortcode to Trigger WooCommerce 'thankyou' Hook | |
| function custom_thankyou_shortcode($atts) { | |
| // Check if WooCommerce is active | |
| if (class_exists('WooCommerce') && function_exists('WFFN_Core') && method_exists(WFFN_Core(), 'get_instance') && method_exists(WFFN_Core()->thank_you_pages, 'execute_wc_thankyou_hooks')) { | |
| // Trigger the WooCommerce 'thankyou' hook | |
| ob_start(); | |
| $order = WFFN_Core()->thank_you_pages->data->get_order(); | |
| do_action( "woocommerce_thankyou_bacs", $order->get_id() ); | |
| remove_all_actions( "woocommerce_thankyou_bacs" ); | |
| $output = ob_get_clean(); |
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( 'WFOB_Compatibility_With_Price_Based_Country' ) ) { | |
| class WFOB_Compatibility_With_Price_Based_Country { | |
| /** | |
| * Initialize hooks | |
| */ | |
| public function __construct() { | |
| add_filter( 'wfob_product_switcher_price_data', [ $this, 'update_price_data' ], 10, 2 ); | |
| add_filter( 'wfob_discount_regular_price_data', [ $this, 'update_discount_price' ], 10, 2 ); | |
| add_filter( 'wfob_discount_price_data', [ $this, 'update_discount_price' ], 10, 2 ); |
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 WFACP_Prevent_Address_Field_Updates { | |
| /** | |
| * Address fields that shouldn't trigger order review updates | |
| * | |
| * @var array | |
| */ | |
| private $address_fields = array( | |
| 'billing_postcode', | |
| 'billing_city', |
NewerOlder