This file contains 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_checkout_page_found', function () { | |
if ( WFACP_Common::is_customizer() ) { | |
return; | |
} | |
$page_design = WFACP_Common::get_page_design( WFACP_Common::get_id() ); | |
if ( 'embed_forms' == $page_design['selected_type'] ) { | |
if ( ! WFACP_Common::is_customizer() ) { | |
add_filter( 'wfacp_embed_form_allow_header', '__return_false' ); | |
return; |
This file contains 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 | |
add_action( 'wp_head', function () { | |
if ( class_exists( 'wfacp_core' ) ) { | |
if ( did_action( 'wfacp_after_checkout_page_found' ) ) { | |
$instance = WFACP_Core()->customizer->get_template_instance(); | |
remove_action( 'wfacp_header_print_in_head', [ $instance, 'add_style_inline' ] ); | |
remove_action( 'wfacp_header_print_in_head', [ $instance, 'typography_custom_css' ] ); | |
} | |
} | |
} ); |
This file contains 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 | |
add_action( 'wp_head', function () { | |
if ( class_exists( 'wfacp_core' ) ) { | |
if ( did_action( 'wfacp_after_checkout_page_found' ) ) { | |
$instance = WFACP_Core()->customizer->get_template_instance(); | |
remove_action( 'wfacp_header_print_in_head', [ $instance, 'add_style_inline' ] ); | |
remove_action( 'wfacp_header_print_in_head', [ $instance, 'typography_custom_css' ] ); | |
} | |
} | |
} ); |
This file contains 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 | |
add_action( 'wp_head', function () { | |
if ( class_exists( 'wfacp_core' ) ) { | |
if ( did_action( 'wfacp_after_checkout_page_found' ) ) { | |
$instance = WFACP_Core()->customizer->get_template_instance(); | |
remove_action( 'wfacp_header_print_in_head', [ $instance, 'add_style_inline' ] ); | |
remove_action( 'wfacp_header_print_in_head', [ $instance, 'typography_custom_css' ] ); | |
} | |
} | |
} ); |
This file contains 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_checkout_page_found', function () { | |
add_action( 'wp_footer', function () { ?> | |
<script> | |
window.addEventListener('load', function () { | |
var do_not_run = false; | |
$(document.body).on('updated_checkout', function () { | |
if ($('#woo_pp_ec_button_checkout .paypal-button').length == 0 && $('#payment_method_ppec_paypal').length == 1) { | |
$('input[name="payment_method"]:checked').click(); | |
} | |
}); |
This file contains 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_before_process_checkout_template_loader', function () { | |
add_filter( 'woocommerce_no_shipping_available_html', function ( $message ) { | |
if ( 39648 !== WFACP_Common::get_id() ) { | |
return $message; | |
} | |
$packages = WC()->shipping()->get_packages(); | |
$postcode = $_REQUEST['s_postcode']; | |
if ( count( $packages['rates'] ) == 0 && '' == $postcode ) { | |
return WFACP_Common::default_shipping_placeholder_text(); |
This file contains 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
window.addEventListener('load',function(){ | |
jQuery('body').trigger('update_checkout'); | |
}); |
This file contains 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 | |
add_filter('wfacp_restrict_sold_individual_checkout','__return_false'); |
This file contains 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 | |
add_filter( 'wfch_offer_product_types', function () { | |
return array( | |
'simple', | |
'variable', | |
'course', | |
'variation', | |
'subscription', | |
'variable-subscription', |
NewerOlder