Plugin Directory

Changeset 2999551


Ignore:
Timestamp:
11/21/2023 12:39:48 PM (2 years ago)
Author:
polyres
Message:
  • [New] Support for WooCommerce 8.3.0
  • [fix] Replace deprecated filter in WooCommerce to woocommerce_account_orders_columns

+ [fix] Check if the function wc_get_page_screen_id exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • repeat-order-for-woocommerce/trunk/repeat-order-for-woocommerce.php

    r2993470 r2999551  
    1717 * Tested up to: 6.4.1
    1818 * WC requires at least: 3.4.0
    19  * WC tested up to: 8.2.1
     19 * WC tested up to: 8.3.0
    2020 *
    2121 * @link      https://poly-res.com
     
    3030}
    3131
    32 define( 'PRRO_VERSION', '1.3.0' );
     32define( 'PRRO_VERSION', '1.3.1' );
    3333
    3434
     
    6262        add_filter( 'woocommerce_admin_order_actions', array( $this, 'add_custom_order_status_actions_button' ), 100, 2 );
    6363        add_action( 'init', array( $this, 'allow_data_order_id' ) );
    64         add_filter( 'woocommerce_my_account_my_orders_columns', array( $this, 'add_my_account_orders_column' ) );
     64        add_filter( 'woocommerce_account_orders_columns', array( $this, 'add_my_account_orders_column' ) );
    6565        add_filter( 'repeat_order_for_woocommerce_settings_extend', array( $this, 'add_settings' ) );
    6666        add_action( 'woocommerce_my_account_my_orders_column_reorder', array( $this, 'my_orders_reorder_column' ) );
     
    492492     */
    493493    public function current_screen() {
    494         $cs = wc_get_page_screen_id('shop-order');
    495         if ( $cs === 'woocommerce_page_wc-orders' ) {
    496             add_action( 'admin_footer', array( $this, 'order_preview_template' ) );
    497             add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
     494        if ( function_exists( 'wc_get_page_screen_id' ) ) {
     495            $cs = wc_get_page_screen_id('shop-order');
     496            if ( $cs === 'woocommerce_page_wc-orders' ) {
     497                add_action( 'admin_footer', array( $this, 'order_preview_template' ) );
     498                add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
     499            }
    498500        }
    499501    }
Note: See TracChangeset for help on using the changeset viewer.