mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Remove the leftover check
This commit is contained in:
parent
216654418c
commit
09b6e09df4
1 changed files with 0 additions and 5 deletions
|
@ -9,7 +9,6 @@ namespace WooCommerce\PayPalCommerce\WcGateway\Settings\WcTasks\Registrar;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists;
|
use Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use WooCommerce\PayPalCommerce\WcGateway\Settings\WcTasks\Tasks\SimpleRedirectTask;
|
|
||||||
use WP_Error;
|
use WP_Error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,10 +23,6 @@ class TaskRegistrar implements TaskRegistrarInterface {
|
||||||
*/
|
*/
|
||||||
public function register( array $tasks ): void {
|
public function register( array $tasks ): void {
|
||||||
foreach ( $tasks as $task ) {
|
foreach ( $tasks as $task ) {
|
||||||
if ( $task instanceof SimpleRedirectTask && ! $task->is_enabled() ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$added_task = TaskLists::add_task( 'extended', $task );
|
$added_task = TaskLists::add_task( 'extended', $task );
|
||||||
if ( $added_task instanceof WP_Error ) {
|
if ( $added_task instanceof WP_Error ) {
|
||||||
throw new RuntimeException( $added_task->get_error_message() );
|
throw new RuntimeException( $added_task->get_error_message() );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue