Skip to content

Commit

Permalink
Merge pull request #46 from smartsendio/fixes/order-bulk-action-missing
Browse files Browse the repository at this point in the history
Fix incorrect screen causing bulk actions to be missing
  • Loading branch information
bilfeldt authored Feb 19, 2024
2 parents 096dde9 + 834f759 commit 23e2539
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions smart-send-logistics/includes/class-ss-shipping-wc-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Automattic\WooCommerce\Utilities\OrderUtil;
use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController;
use WP_Post;
use WooCommerce\Classes\WC_Order;

/**
Expand Down Expand Up @@ -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'));
Expand Down
6 changes: 5 additions & 1 deletion smart-send-logistics/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions smart-send-logistics/smart-send-logistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 23e2539

Please sign in to comment.