get_business_profile( $access_token, $external_business_id ); $business_profile = json_decode( $business_profile_rsp, true ); if ( empty( $business_profile['data'] ) ) { $is_connected = false; } elseif ( ! is_null( $business_profile['data']['status'] ) && 2 !== $business_profile['data']['status'] ) { $is_connected = false; } else { $is_connected = true; } } return $is_connected; } /** * Parent ID. This method is abstract in WooCommerce 6.1.x, 6.2.x and 6.3.x. This implementation is for backward compatibility for these versions. * compatibility-code "WC 6.1.x, WC 6.2.x, WC 6.3.x" * * @return string */ public function get_parent_id() { if ( is_callable( 'parent::get_parent_id' ) ) { return parent::get_parent_id(); } return 'extended'; // The parent task list id. } }