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( 'wfocu_footer_before_print_scripts', 'custom_redirect_after_dynamic_time_in_minutes' ); | |
function custom_redirect_after_dynamic_time_in_minutes() { | |
// Fetch the offer expiry URL using the custom function | |
$expiry_url = WFOCU_Core()->wc_api->get_api_url( 'end_funnel', array( 'log_event' => 'no' ) ); | |
// Set the dynamic redirect time in minutes (e.g., 30 minutes or any value you want) | |
$time_in_minutes = 30; // Change this value to set different minutes for redirection | |
$redirect_time_in_milliseconds = $time_in_minutes * 60 * 1000; // Convert minutes to milliseconds |
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_re_run_get_slide_cart_ajax { | |
public function __construct() { | |
add_filter( 'fkcart_re_run_get_slide_cart_ajax', '__return_true', 9999 ); | |
} | |
} |
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_Avada_Builder_Override_content { | |
public $instance=null; | |
public function __construct() { | |
add_action( 'wfacp_checkout_page_found', [ $this, 'remove_action' ], 9 ); | |
add_action( 'avada_render_header', [ $this, 're_attach_hook' ], 9 ); | |
} | |
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
/** | |
* Hook: wfocu_offer_setup_completed | |
* | |
* Fires after the offer setup process is completed in FunnelKit One Click Upsells. | |
* | |
* This hook allows you to access and manipulate offer data, such as products, after the offer has been fully set up. | |
* You can use this hook to retrieve the product data for the current offer as shown below: | |
* | |
* Example: | |
* add_action( 'wfocu_offer_setup_completed', 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
class WFACP_Custom_field_On_Myaccount { | |
public $wfacp_id = 100; // Add your checkout page ID here | |
public $display_custom_fields = ['age', 'sport1', 'sport2', 'sport3', 'sport4']; // Add your custom field IDs here | |
// Add custom labels for your fields | |
public $field_labels = [ | |
'age' => 'Age Range', | |
'sport1' => 'Primary Sport', | |
'sport2' => 'Secondary Sport', |
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( 'wfacp_show_shipping_options', '__return_true' ); |
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 WC_Hidden_State_Field_Handler { | |
public function __construct() { | |
add_action( 'wfacp_before_checkout_form_fields', [ $this, 'render_hidden_fields_on_page_load' ], 5 ); | |
add_filter( 'woocommerce_checkout_fields', [ $this, 'inject_hidden_fields_on_ajax' ] ); | |
add_action( 'woocommerce_checkout_process', [ $this, 'set_default_values_if_missing' ] ); | |
} | |
/** | |
* Output hidden state fields manually during initial page load (non-AJAX). |
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( 'wfacp_form_section', function( $section ) { | |
$field_ids = wp_list_pluck( $section['fields'], 'id' ); | |
$field_pairs = [ | |
'billing_country' => 'billing_state', | |
'shipping_country' => 'shipping_state', | |
]; | |
foreach ( $field_pairs as $country_id => $state_id ) { | |
if ( in_array( $country_id, $field_ids ) && ! in_array( $state_id, $field_ids ) ) { | |
// Find country field data and its position | |
foreach ( $section['fields'] as $index => $field ) { |
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_Order_Total_Row{ | |
public function __construct() { | |
add_action('fkcart_after_order_summary',[$this,'order_total_row']); | |
} | |
public function order_total_row($front) { | |
$total_amount=""; | |
if ( ! is_null( WC()->session ) && ! is_null( WC()->cart ) ) { | |
$total_amount = WC()->cart->get_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
class Temp_WFACP_Conditional_field { | |
private $conditional_field = []; | |
public function __construct() { | |
$this->conditional_field = [ | |
'shipping_country' => [ | |
[ | |
'value' => 'IE', | |
'fields' => [ 'custom_text' ], | |
'enable' => true, |
NewerOlder