Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Last active April 23, 2024 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlplugins/e94f9c9b45eef7f27ab97b4af6f42b33 to your computer and use it in GitHub Desktop.
Save xlplugins/e94f9c9b45eef7f27ab97b4af6f42b33 to your computer and use it in GitHub Desktop.
Funnelkit Checkout: Compatability Added with InPost PL by iLabs.dev v.1.3.8
class WFACP_Compatibility_With_Inpost_For_WC {
private $instance = null;
public function __construct() {
add_action('wfacp_after_template_found',function(){
add_action('woocommerce_review_order_before_shipping',function(){
if(class_exists('InspireLabs\WoocommerceInpost\shipping\EasyPack_Shippng_Parcel_Machines')){
InspireLabs\WoocommerceInpost\shipping\EasyPack_Shippng_Parcel_Machines::$review_order_after_shipping_once=false;
}
if(class_exists('InspireLabs\WoocommerceInpost\shipping\EasyPack_Shippng_Parcel_Machines_COD')){
InspireLabs\WoocommerceInpost\shipping\EasyPack_Shippng_Parcel_Machines_COD::$review_order_after_shipping_once=false;
}
},9);
});
add_action( 'wfacp_internal_css', [ $this, 'internal_css' ], 10 );
}
public function internal_css() {
?>
<style>
span.easypack-custom-shipping-method-logo {
display: inline-table;
}
.easypack_show_geowidget {
margin: 14px auto;
}
</style>
<?php
}
public function is_enable() {
return function_exists( 'EasyPack' );
}
}
new WFACP_Compatibility_With_Inpost_For_WC();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment