Last active
December 29, 2025 11:17
-
-
Save xlplugins/67cbb1d1c2dcf57521f825a6a3ede4d6 to your computer and use it in GitHub Desktop.
Funnelkit Checkout: Force Enable Product Images in WooFunnels Aero Checkout Order Summary (Elementor)
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_Force_Order_Summary_Images { | |
| /** | |
| * Instance of this class | |
| * | |
| * @var WFACP_Force_Order_Summary_Images | |
| */ | |
| private static $instance = null; | |
| /** | |
| * Target checkout page ID | |
| * | |
| * @var int | |
| */ | |
| private $target_checkout_id = 3972394; | |
| /** | |
| * Get singleton instance | |
| * | |
| * @return WFACP_Force_Order_Summary_Images | |
| */ | |
| public static function get_instance() { | |
| if ( null === self::$instance ) { | |
| self::$instance = new self(); | |
| } | |
| return self::$instance; | |
| } | |
| /** | |
| * Constructor | |
| */ | |
| private function __construct() { | |
| $this->init_hooks(); | |
| } | |
| /** | |
| * Initialize hooks | |
| * | |
| * @return void | |
| */ | |
| private function init_hooks() { | |
| // Force enable product thumbnail filter (high priority to override Elementor template) | |
| // This works on both initial page load and AJAX updates | |
| add_filter( 'wfacp_cart_show_product_thumbnail', array( $this, 'force_enable_thumbnail' ), 999 ); | |
| // Force enable collapsible order summary thumbnail (if using collapsible feature) | |
| add_filter( 'wfacp_cart_show_product_thumbnail_collapsible', array( $this, 'force_enable_thumbnail' ), 999 ); | |
| } | |
| /** | |
| * Check if current checkout page matches target ID | |
| * | |
| * @return bool | |
| */ | |
| private function is_target_checkout_page() { | |
| if ( ! class_exists( 'WFACP_Common' ) || ! method_exists( 'WFACP_Common', 'get_id' ) ) { | |
| return false; | |
| } | |
| $current_id = WFACP_Common::get_id(); | |
| return absint( $current_id ) === absint( $this->target_checkout_id ); | |
| } | |
| /** | |
| * Force enable product thumbnail | |
| * | |
| * @param bool $status Current status | |
| * @return bool Returns true only if on target checkout page | |
| */ | |
| public function force_enable_thumbnail( $status ) { | |
| // Only apply to specific checkout page | |
| if ( ! $this->is_target_checkout_page() ) { | |
| return $status; | |
| } | |
| return true; | |
| } | |
| } | |
| // Initialize the class | |
| WFACP_Force_Order_Summary_Images::get_instance(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment