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
/** | |
* Rendering Custom tracking script for thank you and upsell pages. | |
* | |
* @param $general_data | |
*/ | |
function render_custom_script_tracking( $general_data ) { | |
?> | |
<script type="text/javascript"> | |
if (undefined !== wfocu_tracking_data && '' !== wfocu_tracking_data) { |
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_CustomFields_Inside_Gateway { | |
private $hook = 'woocommerce_checkout_after_terms_and_conditions'; | |
private $hook_priority = 10; | |
private $collected_fields = []; | |
public function __construct() { | |
add_action( $this->hook, [ $this, 'display_fields' ], $this->hook_priority ); |
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( 'wfacp_after_form', function () { | |
?> | |
<script> | |
window.addEventListener('bwf_checkout_js_load',function (){ | |
jQuery.wfacp_step_scrolling= function (scrollElement) {}; | |
wfacp_frontend.hooks.addFilter('wfacp_switch_steps_need_update_checkout',function (){ | |
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
// ADDING 2 NEW COLUMNS WITH THEIR TITLES (keeping "Total" and "Actions" columns at the end) | |
add_filter( 'manage_edit-shop_order_columns', 'wffn_custom_shop_order_column', 22 ); | |
add_filter( 'woocommerce_shop_order_list_table_columns', 'wffn_custom_shop_order_column', 22 ); | |
function wffn_custom_shop_order_column( $columns ) { | |
$reordered_columns = array(); | |
// Inserting columns to a specific location | |
foreach ( $columns as $key => $column ) { | |
$reordered_columns[ $key ] = $column; | |
if ( $key == 'billing_address' ) { |
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( 'wfacp_internal_css', function () { ?> | |
<script> | |
window.addEventListener('bwf_checkout_load', function () { | |
(function ($) { | |
setTimeout(function(){ | |
$(document.body).trigger('update_checkout'); | |
},1000); |
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
/** | |
* attaching the single schedule action on webhook event | |
* this will take care of few edge cases where we have the stripe payment went through fine but in wc no activity shows up | |
*/ | |
add_action( 'fkwcs_webhook_event_intent_succeeded', function ( $charge, $order ) { | |
if ( as_has_scheduled_action( 'fkwcs_custom_single_order', [ 'order' => $order->get_id() ] ) ) { | |
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
class WFACP_Fetchify{ | |
public function __construct() { | |
add_action('wfacp_before_form',[$this, 'add_fields']); | |
add_filter( 'wfacp_internal_css', [ $this, 'add_css_js' ] ); | |
} | |
public function add_fields() { | |
$instance=WFACP_Common::remove_actions('woocommerce_checkout_billing','WC_ClickToAddress_Autocomplete_Integration','addCheckoutJs'); | |
if($instance instanceof WC_ClickToAddress_Autocomplete_Integration){ | |
add_action('woocommerce_before_checkout_form',[$instance,'addCheckoutJs']); |
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', function () { | |
?> | |
<style> | |
body.single-product .mfp-wrap, .mfp-bg { | |
display: none | |
} | |
body.single-product a.added_to_cart.wc-forward { | |
display: none; | |
} |
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_woocommerce_checkout_fields { | |
public $new_fields = []; | |
public function __construct() { | |
/* Create Advance Field */ | |
add_filter( 'wfacp_advanced_fields', [ $this, 'add_fields' ] ); | |
add_filter( 'wfacp_forms_field', [ $this, 'hide_field' ], 99, 2 ); | |
} | |