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_Autoship_wrap { | |
| public function __construct() { | |
| // Register hooks | |
| add_filter('fkcart_update_side_cart_on_load', array($this, 'update_side_cart_on_load')); | |
| add_action('fkcart_quick_before_view_content', array($this, 'before_view_content')); | |
| add_action('fkcart_quick_after_view_content', array($this, 'after_view_content')); | |
| add_action('wp_footer', array($this, 'footer_script')); |
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
| /** | |
| * Restrict shipping based on specific zip codes. | |
| */ | |
| add_action( 'woocommerce_after_checkout_validation', 'restrict_shipping_by_zipcode', 10, 2 ); | |
| function restrict_shipping_by_zipcode( $data, $errors ) { | |
| // List of restricted zip codes | |
| $restricted_zips = ['110001', '00701', '00901']; // Replace with your zip codes | |
| // Get the shipping postcode from the checkout data | |
| $shipping_postcode = isset( $data['shipping_postcode'] ) ? strtoupper(trim($data['shipping_postcode'])) : ''; |
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_text_on_order_summary*/ | |
| function title_html() { | |
| ?> | |
| <div class="wfacp_internal_form_wrap wfacp-comm-title none margin-top"> | |
| <h2 class="wfacp_section_heading wfacp_section_title wfacp-normal wfacp-text-left"> | |
| <?php echo __( 'SUMMARY OF YOUR ORDER', 'woofunnels-aero-checkout' ) ?></h2> | |
| </div> | |
| <?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_action( 'wfacp_after_checkout_page_found', function () { | |
| add_action( 'wp_footer', function () { | |
| ?> | |
| <script> | |
| window.addEventListener('load', function () { | |
| (function ($) { | |
| function extractValueByType(components, typeKey, nameType = 'long_name') { | |
| const match = components.find(comp => comp.types.includes(typeKey)); | |
| return match ? match[nameType] : ''; |
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( 'WFACP_Subtotal_After_Discount' ) ) { | |
| #[AllowDynamicProperties] | |
| class WFACP_Subtotal_After_Discount { | |
| private static $instance = null; | |
| public static function get_instance() { | |
| if ( is_null( self::$instance ) ) { | |
| self::$instance = new self(); |
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('load', function () { | |
| (function ($) { | |
| function remove_single_quotes() { | |
| var billingField = 'billing_address_1'; | |
| var shippingField = 'shipping_address_1'; |
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_WC_Multiple_Customer_Addresses_field_position { | |
| public $instance = null; | |
| public $checkout_instance = null; | |
| public function __construct() { | |
| add_action( 'process_wfacp_html', [ $this, 'display_field' ], 999, 3 ); | |
| /* Add remove action */ | |
| add_action( 'wfacp_template_load', [ $this, 'actions' ], 8 ); |
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_Zero_Price { | |
| public function __construct(){ | |
| add_action( 'woocommerce_before_calculate_totals',[$this,'update_free_gift'], 99 ); | |
| add_action( 'woocommerce_cart_loaded_from_session',[$this,'update_free_gift'], 99 ); | |
| } | |
| /** | |
| * Update free gift product price to 0 | |
| * | |
| * @param $cart | |
| * |
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( 'after_setup_theme', function () { | |
| if ( ! class_exists( 'WFOB_Add_New_Position' ) ) { | |
| return; | |
| } | |
| new WFOB_Add_New_Position( [ | |
| 'position_id' => 'wfacp_template_before_payment_field', | |
| 'hook' => 'wfacp_template_before_payment', | |
| 'position_name' => 'Above Payment Method', |
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_re_run_get_slide_cart_ajax', '__return_true', 9999 ); | |
| add_filter('fkcart_update_side_cart_on_load',function (){ | |
| return 'yes'; | |
| }); | |
| add_action('fkcart_before_cart_items',function (){ | |
| do_action('woocommerce_before_cart'); | |
| }); |