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_Conditional_field_Based_On_Payment_Method { | |
// Payment method that requires address fields | |
public $address_required_payment = 'mollie_wc_gateway_klarna'; | |
// Minimal fields that will always be shown | |
public $minimal_fields = [ | |
'billing_email', | |
'billing_first_name', | |
'billing_last_name', |
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 a note to the order when the order status changes to failed | |
* | |
* @param int $order_id The ID of the order. | |
* @param WC_Order $order The order object. | |
* @param array $status_transition The status transition data. | |
*/ | |
add_action( 'woocommerce_order_status_failed', function ( $order_id, $order, $status_transition ) { | |
if ( $order->get_payment_method() !== 'fkwcs_stripe' ) { | |
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
add_filter( 'sgo_js_async_exclude', function ( $exclude_list ) { | |
$exclude_list[] = 'jCard_js'; | |
return $exclude_list; | |
} ); |
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 FunnelKitCartJsCookie_Quantity { | |
public function __construct() { | |
add_action( 'wp_head', [ $this, 'js' ] ); | |
add_filter( 'fkcart_re_run_slide_cart', '__return_true' ); | |
add_filter( 'fkcart_fragments', [ $this, 'send_fragments' ] ); | |
} | |
public function send_fragments( $fragments ) { | |
$instance = FKCart\Includes\Front::get_instance(); | |
$fragments['fkcart_qty'] = $instance->get_cart_content_count(); |
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( 'woocommerce_after_checkout_form', function () { | |
echo '<div id="classic_pay_with_amazon"></div>'; | |
} ); | |
add_action( 'wp_footer', function () { | |
?> | |
<script> | |
(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_Conditional_field_tmp { | |
private $conditional_field = []; | |
public function __construct() { | |
/* Conditional fields */ | |
$this->conditional_field = [ | |
'tax_exempt_yn' => [ /* tax_exempt_yn*/ |
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_reset_to_variations',function(){ | |
return "Reset to Default 1"; | |
}); | |
add_filter('fkcart_view_details',function(){ | |
return "View Details 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_Ecomus_Addons { | |
public function __construct() { | |
add_action( 'wfacp_after_checkout_page_found', [ $this, 'remove_action' ] ); | |
add_action( 'wfacp_before_process_checkout_template_loader', [ $this, 'remove_action' ] ); | |
add_action( 'wfacp_internal_css', [ $this, 'add_css' ] ); | |
} | |
public function remove_action() { |
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_Field_Modifier { | |
private $unset_fields = [ 'shipping_address_2' ]; | |
public function __construct() { | |
// Remove 'shipping_address_2' field | |
add_filter( 'wfacp_forms_field', [ $this, 'remove_required_fields' ], 9999, 10, 2 ); | |
} | |
// Method to remove required fields |
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_Field_Validator { | |
/** | |
* Disallowed characters in checkout fields | |
*/ | |
private $disallowed_chars = array( '-', '#', '/', '\\', '=', '<', '>', '(', ')' ); | |
/** | |
* Fields to validate against disallowed characters | |
*/ |