• Resolved secureit

    (@secureit)


    I am evaluating plugins in preparation for migrating to HPOS.

    Woolentor Addons 2.7.0 does not appear to be compatible with HPOS.

    • includes/modules/sales-notification/class.sale_notification.php
    • woolentor-blocks/includes/helper-functions.php

    Both of these files are querying the posts table for shop_order post types

    e.g.

    $args = array(
    
                    'post_type' => 'shop_order',
    
                    'post_status' => array('wc-completed', 'wc-pending', 'wc-processing', 'wc-on-hold'),
    
                    'orderby' => 'ID',
    
                    'order' => 'DESC',
    
                    'posts_per_page' => woolentor_get_option( 'notification_limit','woolentor_sales_notification_tabs','5' ),
    
                    'date_query' => array(
    
                        'after' => date('Y-m-d', strtotime('-'.woolentor_get_option('notification_uptodate','woolentor_sales_notification_tabs','5' ).' days'))
    
                    )
    
                );
    
                $posts = get_posts($args);
    $results = $wpdb->get_col( "
            SELECT MAX(ID) FROM {$wpdb->prefix}posts
            WHERE post_type LIKE 'shop_order'
            AND post_status IN ('$statuses')" 
        );
        return reset($results);

    Do you have plans for updating ShopLentor to be fully HPOS compatible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Zenaul Islam

    (@zenaulislam)

    Hi @secureit,

    Thank you very much for reaching out to us ??

    We will discuss our development team regarding this matter and try to make “sale notification” compatible with HPOS.

    Best regards,
    Zenaul Islam

    Thread Starter secureit

    (@secureit)

    I assume this helper function will be updated as well? This would have a potentially negative impact on my Pro version of the plugin.

    /**
    
    * Woocommerce Product last order id return
    
    */
    
    function woolentorBlocks_get_last_order_id(){
    
    global $wpdb;
    
    $statuses = array_keys(wc_get_order_statuses());
    
    $statuses = implode( "','", $statuses );
    
    // Getting last Order ID (max value)
    
    $results = $wpdb->get_col( "
    
    SELECT MAX(ID) FROM {$wpdb->prefix}posts
    
    WHERE post_type LIKE 'shop_order'
    
    AND post_status IN ('$statuses')"
    
    );
    
    return reset($results);
    
    }

    % grep -r woolentorBlocks_get_last_order_id ./wp-content/plugins/woolentor-addons-pro/*

    blocks/thankyou-address-details/index.php:        $received_order_id = woolentorBlocks_get_last_order_id();

    blocks/thankyou-order-details/index.php:    $received_order_id = woolentorBlocks_get_last_order_id();

    blocks/thankyou-order/index.php:        $received_order_id = woolentorBlocks_get_last_order_id();

    Plugin Contributor Tarek Aziz

    (@tarekht)

    Hello there,

    Good morning from here ??

    Thanks very much for your response.

    I appreciate you pointing out the files in such a detailed manner.

    Yes, of course. The helper function you mentioned above will be updated as well.

    If you have any other suggestions or feedback, please don’t hesitate to let us know.

    Wishing you a fantastic day ahead!

    Kindest regards,
    Tarek Aziz

    • This reply was modified 1 year, 5 months ago by Tarek Aziz.
    Plugin Contributor Tarek Aziz

    (@tarekht)

    Hello @secureit,

    I hope everything is going well.

    With great pleasure, I would like to inform you that we have added compatibility with HPOS.

    Could you please check the latest version of the plugin? If you encounter any further issues, please don’t hesitate to report them to us.

    Our dedicated team is always here to assist you.

    All the best,
    Tarek Aziz

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘HPOS Compatibility’ is closed to new replies.