From 834f75923b3c894aa3cf7be79d9c426eacb030df Mon Sep 17 00:00:00 2001 From: Anders Bilfeldt Date: Mon, 19 Feb 2024 10:19:18 +0100 Subject: [PATCH] Fix incorrect screen causing bulk actions to be missing --- .../includes/class-ss-shipping-wc-order.php | 6 +++--- smart-send-logistics/readme.txt | 6 +++++- smart-send-logistics/smart-send-logistics.php | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/smart-send-logistics/includes/class-ss-shipping-wc-order.php b/smart-send-logistics/includes/class-ss-shipping-wc-order.php index 6842b24..b9be5ee 100644 --- a/smart-send-logistics/includes/class-ss-shipping-wc-order.php +++ b/smart-send-logistics/includes/class-ss-shipping-wc-order.php @@ -6,7 +6,6 @@ use Automattic\WooCommerce\Utilities\OrderUtil; use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController; -use WP_Post; use WooCommerce\Classes\WC_Order; /** @@ -82,9 +81,10 @@ protected function init_hooks() */ private function register_bulk_order_actions() { - $screen = class_exists( '\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' ) && wc_get_container()->get(CustomOrdersTableController::class)->custom_orders_table_usage_is_enabled() + $screen = class_exists( '\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' ) + && wc_get_container()->get(CustomOrdersTableController::class)->custom_orders_table_usage_is_enabled() ? 'woocommerce_page_wc-orders' // function not available wc_get_page_screen_id( 'shop-order' ) - : 'shop_order'; + : 'edit-shop_order'; // Index page is called 'edit-shop_order' and not just 'shop_order' as stated in the url // An actions in the dropdown add_filter("bulk_actions-{$screen}", array($this, 'add_bulk_order_actions')); diff --git a/smart-send-logistics/readme.txt b/smart-send-logistics/readme.txt index ecc7eaa..33c4b5e 100755 --- a/smart-send-logistics/readme.txt +++ b/smart-send-logistics/readme.txt @@ -8,7 +8,7 @@ Developer URI: https://smartsend.io/ Tags: smartsend, smart send, shipping, shipping label, pickup, pick-up, pakkelabel, pakkelabels, pakkeboks, pakkeshop, hente selv, døgnboks, postnord, post nord, post danmark, gls, swipbox, bring, dao, dao365, dao 365, burd, budbee, carrier, pacsoft, yourgls, mybring, postage, shipping method, your-gls, my-bring, pacosft-online, pacsoftonline, denmark, sweeden, posten, norway, post Requires at least: 3.0.1 Tested up to: 6.3 -Stable tag: 8.1.0 +Stable tag: 8.1.1 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html WC requires at least: 3.0.0 @@ -200,6 +200,10 @@ This box appears when a "Select Pick-up Point" shipping method is selected, but == Changelog == += 8.1.1 = +* Fixing issue that order mass actions were missing on non-HPOS sites +* Removing PHP warning + = 8.1.0 = * Add High-Performance Order Storage (HPOS) compatibility diff --git a/smart-send-logistics/smart-send-logistics.php b/smart-send-logistics/smart-send-logistics.php index ecc46a3..642cd7f 100644 --- a/smart-send-logistics/smart-send-logistics.php +++ b/smart-send-logistics/smart-send-logistics.php @@ -6,7 +6,7 @@ * Author: Smart Send ApS * Author URI: https://www.smartsend.io * Text Domain: smart-send-logistics - * Version: 8.1.0 + * Version: 8.1.1 * WC requires at least: 4.7.0 * WC tested up to: 7.9 * @@ -34,7 +34,7 @@ class SS_Shipping_WC { - private $version = "8.1.0"; + private $version = "8.1.1"; /** * Instance to call certain functions globally within the plugin